We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46c881d commit ca43bd3Copy full SHA for ca43bd3
1 file changed
test/parallel/test-timers-invalid-clear.js
@@ -1,31 +1,10 @@
1
'use strict';
2
3
const common = require('../common');
4
-const assert = require('assert');
5
6
-async function test() {
7
- const t = setTimeout(() => {
8
- console.log('1');
9
- }, 0);
+const t = setTimeout(common.mustCall());
10
11
- clearImmediate(t);
+clearImmediate(t); // Should be a noop
12
13
- const value1 = await new Promise((resolve) =>
14
- setTimeout(() => {
15
- console.log('2');
16
- resolve(2);
17
- }, 0)
18
- );
19
-
20
- const value2 = await new Promise((resolve) =>
21
22
- console.log('3');
23
- resolve(3);
24
25
26
27
- assert.strictEqual(value1, 2);
28
- assert.strictEqual(value2, 3);
29
-}
30
31
-test().then(common.mustCall());
+setTimeout(common.mustCall());
0 commit comments