diff options
| author | 2023-03-18 18:03:05 -0700 | |
|---|---|---|
| committer | 2023-03-18 18:03:05 -0700 | |
| commit | 8f02ef829474cbd5453ffcb6485d40f93424ad26 (patch) | |
| tree | 783bf3e6b466d6abdfdc92b18464f4ecc27d1468 | |
| parent | e41e8847473a9daf9baf1d8c492f325686c03960 (diff) | |
| download | bun-8f02ef829474cbd5453ffcb6485d40f93424ad26.tar.gz bun-8f02ef829474cbd5453ffcb6485d40f93424ad26.tar.zst bun-8f02ef829474cbd5453ffcb6485d40f93424ad26.zip | |
0 length body is a null stream
| -rw-r--r-- | test/js/web/fetch/body-stream.test.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/js/web/fetch/body-stream.test.ts b/test/js/web/fetch/body-stream.test.ts index 1cd932ed9..ecfa3e7be 100644 --- a/test/js/web/fetch/body-stream.test.ts +++ b/test/js/web/fetch/body-stream.test.ts @@ -198,12 +198,11 @@ function gc() { describe("reader", function () { try { - // - empty // - 1 byte // - less than the InlineBlob limit // - multiple chunks // - backpressure - for (let inputLength of [0, 1, 2, 12, 95, 1024, 1024 * 1024, 1024 * 1024 * 2]) { + for (let inputLength of [1, 2, 12, 95, 1024, 1024 * 1024, 1024 * 1024 * 2]) { var bytes = new Uint8Array(inputLength); { const chunk = Math.min(bytes.length, 256); @@ -243,6 +242,8 @@ describe("reader", function () { ]) { gc(); const thisArray = huge_; + if (Number(thisArray.byteLength ?? thisArray.size) === 0) continue; + it(`works with ${thisArray.constructor.name}(${ thisArray.byteLength ?? thisArray.size }:${inputLength}) via req.body.getReader() in chunks`, async () => { |
