Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d1da899

Browse filesBrowse files
lrlnaaddaleax
authored andcommitted
test: increase coverage for timers
Add a test for cancelling timers with null or no arguments. PR-URL: #10068 Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
1 parent 78e188d commit d1da899
Copy full SHA for d1da899

File tree

Expand file treeCollapse file tree

1 file changed

+18
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+18
-0
lines changed
Open diff view settings
Collapse file
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use strict';
2+
require('../common');
3+
const assert = require('assert');
4+
5+
// This test makes sure clearing timers with
6+
// 'null' or no input does not throw error
7+
8+
assert.doesNotThrow(() => clearInterval(null));
9+
10+
assert.doesNotThrow(() => clearInterval());
11+
12+
assert.doesNotThrow(() => clearTimeout(null));
13+
14+
assert.doesNotThrow(() => clearTimeout());
15+
16+
assert.doesNotThrow(() => clearImmediate(null));
17+
18+
assert.doesNotThrow(() => clearImmediate());

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.