Function
makeFile
(size: number, name = 'test.bin', type = 'application/octet-stream')
Source from the content-addressed store, hash-verified
| 12 | const LARGE_THRESHOLD = 50 * ONE_MB |
| 13 | |
| 14 | const makeFile = (size: number, name = 'test.bin', type = 'application/octet-stream'): File => { |
| 15 | const file = new File([new Uint8Array(0)], name, { type }) |
| 16 | Object.defineProperty(file, 'size', { value: size }) |
| 17 | return file |
| 18 | } |
| 19 | |
| 20 | const presigned = (overrides?: Partial<PresignedUploadInfo>): PresignedUploadInfo => ({ |
| 21 | fileName: 'test.bin', |
Tested by
no test coverage detected