summaryrefslogtreecommitdiff
path: root/test/parallel
diff options
context:
space:
mode:
authorsgreylyn <seth.greylyn@gmail.com>2017-11-16 22:46:14 -0800
committerAnatoli Papirovski <apapirovski@mac.com>2017-11-20 09:56:08 -0500
commit52010553d3c37b9d0b75d4c3ca9e63956a59a047 (patch)
treead9b5e01e5aa20077a97a9f82b5739dfe3d9d1b9 /test/parallel
parente51216d722ca43b2db7f79c0c23e917f5b85bd3d (diff)
downloadandroid-node-v8-52010553d3c37b9d0b75d4c3ca9e63956a59a047.tar.gz
android-node-v8-52010553d3c37b9d0b75d4c3ca9e63956a59a047.tar.bz2
android-node-v8-52010553d3c37b9d0b75d4c3ca9e63956a59a047.zip
test: replace assert.throws w/ common.expectsError
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'test/parallel')
-rw-r--r--test/parallel/test-next-tick-errors.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/parallel/test-next-tick-errors.js b/test/parallel/test-next-tick-errors.js
index 989d02b4d9..acb7c49727 100644
--- a/test/parallel/test-next-tick-errors.js
+++ b/test/parallel/test-next-tick-errors.js
@@ -20,7 +20,7 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
-require('../common');
+const common = require('../common');
const assert = require('assert');
const order = [];
@@ -42,11 +42,15 @@ process.nextTick(function() {
});
function testNextTickWith(val) {
- assert.throws(
+ common.expectsError(
function() {
process.nextTick(val);
},
- TypeError
+ {
+ code: 'ERR_INVALID_CALLBACK',
+ name: 'TypeError [ERR_INVALID_CALLBACK]',
+ type: TypeError
+ }
);
}