summaryrefslogtreecommitdiff
path: root/js/timers_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/timers_test.ts')
-rw-r--r--js/timers_test.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/timers_test.ts b/js/timers_test.ts
index f4757bdb2..bc4fcffcf 100644
--- a/js/timers_test.ts
+++ b/js/timers_test.ts
@@ -259,6 +259,21 @@ test(function setTimeoutShouldThrowWithBigint(): void {
assertEquals(hasThrown, 2);
});
+test(function clearTimeoutShouldThrowWithBigint(): void {
+ let hasThrown = 0;
+ try {
+ clearTimeout((1n as unknown) as number);
+ hasThrown = 1;
+ } catch (err) {
+ if (err instanceof TypeError) {
+ hasThrown = 2;
+ } else {
+ hasThrown = 3;
+ }
+ }
+ assertEquals(hasThrown, 2);
+});
+
test(function testFunctionName(): void {
assertEquals(clearTimeout.name, "clearTimeout");
assertEquals(clearInterval.name, "clearInterval");