mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 21:58:48 +02:00
test: replace assert.throws w/ common.expectsError
PR-URL: https://github.com/nodejs/node/pull/17557 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
4df7c190bf
commit
094bfaf769
19 changed files with 134 additions and 132 deletions
|
@ -17,12 +17,12 @@ common.expectsError(
|
|||
code: 'ERR_INVALID_ARG_TYPE',
|
||||
type: TypeError,
|
||||
});
|
||||
assert.throws(() => {
|
||||
common.expectsError(() => {
|
||||
new AsyncResource('invalid_trigger_id', { triggerAsyncId: null });
|
||||
}, common.expectsError({
|
||||
}, {
|
||||
code: 'ERR_INVALID_ASYNC_ID',
|
||||
type: RangeError,
|
||||
}));
|
||||
});
|
||||
|
||||
assert.strictEqual(
|
||||
new AsyncResource('default_trigger_id').triggerAsyncId(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue