diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/timers_test.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/js/timers_test.ts b/js/timers_test.ts index d1bce82a9..b43817437 100644 --- a/js/timers_test.ts +++ b/js/timers_test.ts @@ -132,11 +132,9 @@ test(async function intervalCancelSuccess() { let count = 0; const id = setInterval(() => { count++; - }, 500); - // Cancelled, count should not increment + }, 1); clearInterval(id); - // Wait a bit longer than 500ms - await waitForMs(600); + await waitForMs(500); assertEquals(count, 0); }); @@ -150,9 +148,9 @@ test(async function intervalOrdering() { } } for (let i = 0; i < 10; i++) { - timers[i] = setTimeout(onTimeout, 20); + timers[i] = setTimeout(onTimeout, 1); } - await waitForMs(100); + await waitForMs(500); assertEquals(timeouts, 1); }); |