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 Anatoli Papirovski committed 2017-12-08 16:02:07 -05:00
1 parent 20d6b8c6c0
commit eae0c05697
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'
});
});
}