mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
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:
1 parent
20d6b8c6c0
commit
eae0c05697
48 files changed
+357
-368
No files matched your search
@@ -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'
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user