Skip to content

Commit 5201055

Browse files
SethGreylynapapirovski
authored andcommitted
test: replace assert.throws w/ common.expectsError
PR-URL: #17091 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
1 parent e51216d commit 5201055

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

test/parallel/test-next-tick-errors.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23-
require('../common');
23+
const common = require('../common');
2424
const assert = require('assert');
2525

2626
const order = [];
@@ -42,11 +42,15 @@ process.nextTick(function() {
4242
});
4343

4444
function testNextTickWith(val) {
45-
assert.throws(
45+
common.expectsError(
4646
function() {
4747
process.nextTick(val);
4848
},
49-
TypeError
49+
{
50+
code: 'ERR_INVALID_CALLBACK',
51+
name: 'TypeError [ERR_INVALID_CALLBACK]',
52+
type: TypeError
53+
}
5054
);
5155
}
5256

0 commit comments

Comments
 (0)