test: add more asserts to test-internal-errors
PR-URL: https://github.com/nodejs/node/pull/13686 Fixes: https://github.com/nodejs/node/issues/13682 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
parent
29d99c1885
commit
15016f227b
@ -187,6 +187,7 @@ common.expectsError(() => {
|
|||||||
message: /^Error for testing 2/ });
|
message: /^Error for testing 2/ });
|
||||||
}, {
|
}, {
|
||||||
code: 'ERR_ASSERTION',
|
code: 'ERR_ASSERTION',
|
||||||
|
type: assert.AssertionError,
|
||||||
message: /.+ does not match \S/
|
message: /.+ does not match \S/
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -237,6 +238,7 @@ common.expectsError(
|
|||||||
() => errors.message('ERR_INVALID_URL_SCHEME', [[]]),
|
() => errors.message('ERR_INVALID_URL_SCHEME', [[]]),
|
||||||
{
|
{
|
||||||
code: 'ERR_ASSERTION',
|
code: 'ERR_ASSERTION',
|
||||||
|
type: assert.AssertionError,
|
||||||
message: /^At least one expected value needs to be specified$/
|
message: /^At least one expected value needs to be specified$/
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -251,6 +253,7 @@ common.expectsError(
|
|||||||
() => errors.message('ERR_MISSING_ARGS'),
|
() => errors.message('ERR_MISSING_ARGS'),
|
||||||
{
|
{
|
||||||
code: 'ERR_ASSERTION',
|
code: 'ERR_ASSERTION',
|
||||||
|
type: assert.AssertionError,
|
||||||
message: /^At least one arg needs to be specified$/
|
message: /^At least one arg needs to be specified$/
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user