Closed
Description
- Version: *
- Platform: *
- Subsystem: test
Ref: #13623 (comment)
as reported by @cjihrig:
common.expectsError()
is subtly broken. It relies oninstanceof
to check the error type. So aTypeError
is an instance ofError
, which is why this passed. The simplest fix might be to checkerror.constructor
inside ofcommon.expectsError()
. But that will require updating a bunch of tests because we're now using custom errors all over the place.