You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API of assert.rejects is different between the 10.* series and the 8.* series, because the backported 8.* version does not accept a Promise as first argument, it requires a Function that returns a rejected promise.
If you misuse the API, though, you get a confusing error message:
TypeError: errors.ERR_INVALID_ARG_TYPE is not a constructor
at waitForActual (assert.js:723:11)
at Function.rejects (assert.js:799:31)
This fixes a regression for an error case with `assert.rejects` and
`assert.doesNotReject`.
Fixes: #27185
PR-URL: #27202
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
The API of
assert.rejects
is different between the 10.* series and the 8.* series, because the backported 8.* version does not accept aPromise
as first argument, it requires aFunction
that returns a rejected promise.If you misuse the API, though, you get a confusing error message:
This is because at
node/lib/assert.js
Line 723 in 045868d
The text was updated successfully, but these errors were encountered: