mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05: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
993b1cbc6d
commit
d15cdc6fdb
48 files changed
+357
-368
No files matched your search
@@ -59,16 +59,16 @@ assert.throws(
|
||||
}
|
||||
);
|
||||
|
||||
assert.throws(
|
||||
common.expectsError(
|
||||
require,
|
||||
common.expectsError({
|
||||
{
|
||||
code: 'ERR_ASSERTION',
|
||||
message: /^missing path$/
|
||||
}));
|
||||
});
|
||||
|
||||
assert.throws(
|
||||
common.expectsError(
|
||||
() => { require({}); },
|
||||
common.expectsError({
|
||||
{
|
||||
code: 'ERR_ASSERTION',
|
||||
message: /^path must be a string$/
|
||||
}));
|
||||
});
|
||||
Reference in new issue
Block a user