Description
t.throws()
and t.throwsAsync()
require the resulting exception to be a proper error:
Lines 147 to 154 in 952a017
I propose we add an any: boolean
option to the expectations
object used for these assertions. If true
it won't cause a failed assertion when the exception is not an error.
We need to update the validation logic here to allow this property:
Line 74 in 952a017
Don't forget to update the type definition:
Line 11 in 952a017
If any
is true
, we should try and change the typing of the return value to be unknown
:
Line 252 in 952a017
Line 263 in 952a017
And update our own tests:
Line 786 in 952a017
Line 976 in 952a017
See also the discussion in #1841.