summaryrefslogtreecommitdiff
path: root/js/timers_test.ts
diff options
context:
space:
mode:
author迷渡 <justjavac@gmail.com>2019-07-18 18:09:32 +0800
committerRyan Dahl <ry@tinyclouds.org>2019-07-18 06:09:32 -0400
commitac98bd8a7ce13e6aaf35d13b8743281df24806d7 (patch)
tree87fb07b604fc2876341a881dd6562f466396764f /js/timers_test.ts
parenta0b8f13f18b24924d050e196baf6132b27a6011f (diff)
fix timer's params length (#2655)
Diffstat (limited to 'js/timers_test.ts')
-rw-r--r--js/timers_test.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/timers_test.ts b/js/timers_test.ts
index 76563c96e..2b10d9dad 100644
--- a/js/timers_test.ts
+++ b/js/timers_test.ts
@@ -249,6 +249,13 @@ test(function testFunctionName(): void {
assertEquals(clearInterval.name, "clearInterval");
});
+test(function testFunctionParamsLength(): void {
+ assertEquals(setTimeout.length, 1);
+ assertEquals(setInterval.length, 1);
+ assertEquals(clearTimeout.length, 0);
+ assertEquals(clearInterval.length, 0);
+});
+
test(function clearTimeoutAndClearIntervalNotBeEquals(): void {
assertNotEquals(clearTimeout, clearInterval);
});