summaryrefslogtreecommitdiff
path: root/test/parallel/test-process-next-tick.js
diff options
context:
space:
mode:
authorMithun Sasidharan <mithunsasidharan89@gmail.com>2017-12-06 22:16:44 +0530
committerAnatoli Papirovski <apapirovski@mac.com>2017-12-08 16:02:07 -0500
commiteae0c05697121aaae4b097f34d30a259c8591af1 (patch)
tree5a249a64f5309a1865e6f1540a39264eb7b898f9 /test/parallel/test-process-next-tick.js
parent20d6b8c6c01c09a51f503f7f8a0fee494be6f742 (diff)
downloadnode-new-eae0c05697121aaae4b097f34d30a259c8591af1.tar.gz
test: replace assert.throws w/ common.expectsError
PR-URL: https://github.com/nodejs/node/pull/17498 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
Diffstat (limited to 'test/parallel/test-process-next-tick.js')
-rw-r--r--test/parallel/test-process-next-tick.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/parallel/test-process-next-tick.js b/test/parallel/test-process-next-tick.js
index 5c07887080..59de0da42d 100644
--- a/test/parallel/test-process-next-tick.js
+++ b/test/parallel/test-process-next-tick.js
@@ -21,7 +21,6 @@
'use strict';
const common = require('../common');
-const assert = require('assert');
const N = 2;
function cb() {
@@ -39,10 +38,10 @@ process.on('exit', function() {
});
[null, 1, 'test', {}, [], Infinity, true].forEach((i) => {
- assert.throws(() => process.nextTick(i),
- common.expectsError({
- code: 'ERR_INVALID_CALLBACK',
- type: TypeError,
- message: 'Callback must be a function'
- }));
+ common.expectsError(() => process.nextTick(i),
+ {
+ code: 'ERR_INVALID_CALLBACK',
+ type: TypeError,
+ message: 'Callback must be a function'
+ });
});