Skip to content
Permalink
Browse files

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>
  • Loading branch information...
SethGreylyn authored and apapirovski committed Nov 17, 2017
1 parent e51216d commit 52010553d3c37b9d0b75d4c3ca9e63956a59a047
Showing with 7 additions and 3 deletions.
  1. +7 −3 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
}
);
}

0 comments on commit 5201055

Please sign in to comment.
You can’t perform that action at this time.