create-large-file.ts
This file
Path
test/helpers/create-large-file.ts
7 lines · 318 bytes · TypeScript
Last changed by
Not known.
History of this fileTake it
12345678// Helper function to create a large Blobexport function createLargeBlob(sizeInMB: number): Blob { const chunkSize = 1024 * 1024; // 1MB // eslint-disable-next-line unicorn/no-new-array const chunks = new Array(sizeInMB).fill('x'.repeat(chunkSize)); return new Blob(chunks, {type: 'application/octet-stream'});}