Closed
Description
- Version: latest 8.* series
- Platform: not relevant
- Subsystem: assert
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 is because at
Line 723 in 045868d