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>
This commit is contained in:
Mithun Sasidharan authored and Myles Borins committed 2017-12-12 03:28:30 -05:00
1 parent 993b1cbc6d
commit d15cdc6fdb
48 files changed
+357 -368

No files matched your search

+6 -6
View File
@@ -71,12 +71,12 @@ const {
{
[1, {}, [], null, undefined, Infinity].forEach((i) => {
assert.throws(() => performance.timerify(i),
common.expectsError({
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
message: 'The "fn" argument must be of type Function'
}));
common.expectsError(() => performance.timerify(i),
{
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
message: 'The "fn" argument must be of type Function'
});
});
}