-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Jest marks a test as "Passed" when an assertion fails on a .resolves
#4997
Comments
You have to |
Oh really? Ugh, sorry for wasting your time - I thought that requirement had been removed with the addition of |
You still have to somehow tell jest to wait for it - it's still a promise 🙂 Difference now is that you await the |
Hehe yeah it makes sense. Gives me some bad faith about all those tests I've already written without this measure :P I could submit a PR to emphasise this in the docs if you think that's a good idea? |
Please do! All doc improvements are very welcome |
Emphasise that `.rejects` and `.resolves` still require the assertion to be returned, in response to jestjs#4997.
Emphasise that `.rejects` and `.resolves` still require the assertion to be returned, in response to #4997.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Do you want to request a feature or report a bug?
A bug.
What is the current behavior?
The following assertion fails:
It throws an error, but nevertheless, Jest marks the test as Passed. See this repl.it:
https://repl.it/repls/ObedientNegativeGrison
What is the expected behavior?
Jest should mention that the test failed.
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
The text was updated successfully, but these errors were encountered: