mirror of
https://github.com/nodejs/node.git
synced 2025-08-16 06:08:50 +02:00
test: fix wrong error classes passed in as type
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
22760f31be
commit
f26cabbe24
12 changed files with 45 additions and 16 deletions
|
@ -163,7 +163,11 @@ assert.doesNotThrow(() => {
|
|||
assert.doesNotThrow(() => {
|
||||
common.expectsError(() => {
|
||||
throw new errors.TypeError('TEST_ERROR_1', 'a');
|
||||
}, { code: 'TEST_ERROR_1', type: Error });
|
||||
}, {
|
||||
code: 'TEST_ERROR_1',
|
||||
type: TypeError,
|
||||
message: 'Error for testing purposes: a'
|
||||
});
|
||||
});
|
||||
|
||||
common.expectsError(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue