From 37525db5cf2b8b609bd16cc9cfa0c80aa80f9f00 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Fri, 2 Dec 2022 00:25:38 -0800 Subject: Faster test --- test/bun.js/fetch.test.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'test/bun.js/fetch.test.js') diff --git a/test/bun.js/fetch.test.js b/test/bun.js/fetch.test.js index 65efc6ab5..b25f81409 100644 --- a/test/bun.js/fetch.test.js +++ b/test/bun.js/fetch.test.js @@ -245,12 +245,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(); }); -- cgit v1.2.3