Skip to content
Myr

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 file

Take it

The walk stopped after 200 commits: lines older than 37fc250 point at it.

Add retry count to `afterResponse` and `beforeError` hooks (#763)Sindre Sorhusbefore adoption37fc250

lines 1–7why, one step back
1// Helper function to create a large Blob
2export function createLargeBlob(sizeInMB: number): Blob {3 const chunkSize = 1024 * 1024; // 1MB4 // eslint-disable-next-line unicorn/no-new-array5 const chunks = new Array(sizeInMB).fill('x'.repeat(chunkSize));6 return new Blob(chunks, {type: 'application/octet-stream'});7}