Files
cordova-plugin-advanced-http/test/mocks/File.mock.js
2025-12-02 08:27:04 +01:00

18 lines
391 B
JavaScript

const BlobMock = require('./Blob.mock');
module.exports = class FileMock extends BlobMock {
constructor(blob, fileName) {
super(blob, { type: blob.type });
this._fileName = fileName !== undefined ? fileName : 'blob';
this.__lastModifiedDate = new Date();
}
get name() {
return this._fileName;
}
get lastModifiedDate() {
return this.__lastModifiedDate;
}
}