From aaaa35548e146348a7f0c417e7ae64889fe744fb Mon Sep 17 00:00:00 2001 From: bokuweb Date: Sun, 27 Jan 2019 06:10:38 +0900 Subject: timers: use int instead of double for timeout type (#1469) --- js/timers_test.ts | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'js/timers_test.ts') diff --git a/js/timers_test.ts b/js/timers_test.ts index 1ea566c43..fe2ff64df 100644 --- a/js/timers_test.ts +++ b/js/timers_test.ts @@ -155,3 +155,12 @@ test(async function intervalCancelInvalidSilentFail() { // Should silently fail (no panic) clearInterval(2147483647); }); + +test(async function fireCallbackImmediatelyWhenDelayOverMaxValue() { + let count = 0; + setTimeout(() => { + count++; + }, 2 ** 31); + await waitForMs(1); + assertEqual(count, 1); +}); -- cgit v1.2.3