We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
setTimeout
NaN
1 parent ea837a0 commit 2591638Copy full SHA for 2591638
test/parallel/test-timers-nan-duration-warning-promises.js
@@ -0,0 +1,11 @@
1
+'use strict';
2
+
3
+const common = require('../common');
4
+const assert = require('assert');
5
+const { setTimeout } = require('timers/promises');
6
7
+process.once('warning', common.mustCall((warning) => {
8
+ assert.strictEqual(warning.name, 'TimeoutNaNWarning');
9
+}));
10
11
+setTimeout(NaN).then(common.mustCall(), common.mustNotCall());
0 commit comments