We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e51216d commit 5201055Copy full SHA for 5201055
test/parallel/test-next-tick-errors.js
@@ -20,7 +20,7 @@
20
// USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22
'use strict';
23
-require('../common');
+const common = require('../common');
24
const assert = require('assert');
25
26
const order = [];
@@ -42,11 +42,15 @@ process.nextTick(function() {
42
});
43
44
function testNextTickWith(val) {
45
- assert.throws(
+ common.expectsError(
46
function() {
47
process.nextTick(val);
48
},
49
- TypeError
+ {
50
+ code: 'ERR_INVALID_CALLBACK',
51
+ name: 'TypeError [ERR_INVALID_CALLBACK]',
52
+ type: TypeError
53
+ }
54
);
55
}
56
0 commit comments