diff options
Diffstat (limited to 'test/bun.js/fetch.test.js')
-rw-r--r-- | test/bun.js/fetch.test.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/bun.js/fetch.test.js b/test/bun.js/fetch.test.js index af5de1b5a..65efc6ab5 100644 --- a/test/bun.js/fetch.test.js +++ b/test/bun.js/fetch.test.js @@ -1,7 +1,7 @@ import { it, describe, expect } from "bun:test"; import fs, { unlinkSync } from "fs"; import { mkfifo } from "mkfifo"; -import { gc } from "./gc"; +import { gc, withoutAggressiveGC } from "./gc"; const exampleFixture = fs.readFileSync( import.meta.path.substring(0, import.meta.path.lastIndexOf("/")) + @@ -218,12 +218,14 @@ function testBlobInterface(blobbyConstructor, hasBlobFn) { const compare = new Uint8Array(await response.arrayBuffer()); if (withGC) gc(); - for (let i = 0; i < compare.length; i++) { - if (withGC) gc(); + withoutAggressiveGC(() => { + for (let i = 0; i < compare.length; i++) { + if (withGC) gc(); - expect(compare[i]).toBe(bytes[i]); - if (withGC) gc(); - } + expect(compare[i]).toBe(bytes[i]); + if (withGC) gc(); + } + }); if (withGC) gc(); }); |