From 9914bcaae98f0896fe1b6ab5206dbb4dc51ad20a Mon Sep 17 00:00:00 2001 From: sgreylyn Date: Thu, 16 Nov 2017 22:46:14 -0800 Subject: [PATCH] test: replace assert.throws w/ common.expectsError MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/17091 Reviewed-By: Colin Ihrig Reviewed-By: Michaƫl Zasso Reviewed-By: Luigi Pinca Reviewed-By: Gireesh Punathil --- test/parallel/test-next-tick-errors.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-next-tick-errors.js b/test/parallel/test-next-tick-errors.js index 989d02b4d9f3e4..acb7c497278429 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 + } ); }