Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace assert.throws() with common.expectsError() in test/parallel/next-tick-errors.js (take 2) #17091

Closed
wants to merge 6 commits into from
Closed
10 changes: 7 additions & 3 deletions test/parallel/test-next-tick-errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];
Expand All @@ -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
}
);
}

Expand Down