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
@@ -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$/
}));
});