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 9914bca

Browse filesBrowse files
SethGreylynMylesBorins
authored andcommitted
test: replace assert.throws w/ common.expectsError
PR-URL: #17091 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent e7db034 commit 9914bca
Copy full SHA for 9914bca

File tree

Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-3
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-next-tick-errors.js
+7-3Lines changed: 7 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.