summaryrefslogtreecommitdiff
path: root/tests/unit/timers_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/timers_test.ts')
-rw-r--r--tests/unit/timers_test.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/unit/timers_test.ts b/tests/unit/timers_test.ts
index 17b137231..9e3b082dd 100644
--- a/tests/unit/timers_test.ts
+++ b/tests/unit/timers_test.ts
@@ -238,8 +238,8 @@ Deno.test(async function callbackTakesLongerThanInterval() {
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 300);
timeEndOfFirstCallback = Date.now();
} else {
- // Second callback
- assert(Date.now() - 100 >= timeEndOfFirstCallback);
+ // Second callback should be nearly instantaneous
+ assert(Date.now() - timeEndOfFirstCallback < 10);
clearInterval(interval);
resolve();
}