1 export function mockGlobalFile() {
3 global.File = class MockFile {
10 parts: (string | Blob | ArrayBuffer | ArrayBufferView)[];
12 properties?: FilePropertyBag;
17 parts: (string | Blob | ArrayBuffer | ArrayBufferView)[],
19 properties?: FilePropertyBag
23 this.size = parts.join('').length;
25 this.properties = properties;
26 this.lastModified = 1234567890000; // Sat Feb 13 2009 23:31:30 GMT+0000.
31 export function testFile(filename: string, size: number = 42) {
32 return new File(['x'.repeat(size)], filename, undefined);