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
Using expect(..).toThrow(Error) the error shown on failure is simply expected error to be instance of Error. This contains very little useful info because it does not say what the actual error was or if an error was thrown at all.
I would have expected toThrow to have an output similar to to.throw, which provides a very detailed diff of the expected and actual errors.
Describe the bug
Using
expect(..).toThrow(Error)
the error shown on failure is simplyexpected error to be instance of Error
. This contains very little useful info because it does not say what the actual error was or if an error was thrown at all.I would have expected
toThrow
to have an output similar toto.throw
, which provides a very detailed diff of the expected and actual errors.Reproduction
outputs
instead of a detailed diff like
to.error
does.System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: