-
Notifications
You must be signed in to change notification settings - Fork 1.4k
t.notThrows() gives no info on thrown error in case an error is thrown #1150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Yes, that's pretty bad UX. For this assertion we're using the built-in |
Ok thanks @sindresorhus |
novemberborn
added a commit
that referenced
this issue
Mar 10, 2017
This is especially useful for `t.notThrows()`, which includes the thrown exception as the `actual` value for the assertion error. Fixes #1150.
Merged
novemberborn
added a commit
that referenced
this issue
Mar 10, 2017
This is especially useful for `t.notThrows()`, which includes the thrown exception as the `actual` value for the assertion error. Fixes #1150.
novemberborn
added a commit
that referenced
this issue
Mar 13, 2017
This is especially useful for `t.notThrows()`, which includes the thrown exception as the `actual` value for the assertion error. Fixes #1150.
sindresorhus
pushed a commit
that referenced
this issue
Mar 14, 2017
This is especially useful for `t.notThrows()`, which includes the thrown exception as the `actual` value for the assertion error. Fixes #1150.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
I have yet to make a test which uses
t.notThrows()
pass. Is it by design to not get any info on the thrown error whent.notThrows()
actually errors out? All I get is:Got unwanted exception..
I would like to see the stack trace.
Currently, I'm expecting the code to fail with a
SequelizeUniqueConstraintError: Validation error
error. But since I'm not seeing anything other thanGot unwanted exception..
, I cannot verify this. Later on, after fixing this, if the test fails again, I would like to see the stack trace to see if it's still because of the constraint violation.Test Source
Error Message & Stack Trace
Config
Copy the relevant section from
package.json
:Command-Line Arguments
--verbose
does not help.Environment
Tell us which operating system you are using, as well as which versions of Node.js, npm, and AVA. Run the following to get it quickly:
The text was updated successfully, but these errors were encountered: