From fbbc20fe83383eb89e4f9979cd0d1750e2e5b8d3 Mon Sep 17 00:00:00 2001 From: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Date: Mon, 29 Apr 2024 12:47:08 -0700 Subject: [PATCH] fix flaky `setTimeout` test (#10656) --- test/js/web/timers/setTimeout.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/js/web/timers/setTimeout.test.js b/test/js/web/timers/setTimeout.test.js index 0e3ba0078d..e24b1df2aa 100644 --- a/test/js/web/timers/setTimeout.test.js +++ b/test/js/web/timers/setTimeout.test.js @@ -154,7 +154,7 @@ it("Bun.sleep works with a Date object", async () => { var ten_ms = new Date(); ten_ms.setMilliseconds(ten_ms.getMilliseconds() + offset); await Bun.sleep(ten_ms); - expect(Math.ceil(performance.now() - now)).toBeGreaterThan(offset); + expect(Math.ceil(performance.now() - now)).toBeGreaterThanOrEqual(offset); }); it("Bun.sleep(Date) fulfills after Date", async () => {