-
-
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
Runtime errors preventing test from being run don't count test as failed #589
Comments
Hey! Are you using jest 0.7.0? This was fixed recently. |
Yeah, my bad. New version works just fine! |
This is still broken for me with 0.7.1 and even when trying latest at 0.7.2. I get exit status of 0 when there are run time errors in my jest tests. |
|
Ok good to know! Thank you, was about to open a new issue. |
Sorry, this entire issue is confusing, there were a bunch of other small counting issues when we changed to test suites vs. tests and I should have been more thorough during code review. |
No problem, although turns out that I get an exit status of 0 for any kind of test failure. Looking at the PR and f518a92 it wasn't clear to me if that was also part of that. I purposefully made a test fail and got this:
Just an FYI. Thanks. |
There we go: #618 |
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. |
Given a code like this:
I expect to get final report as following:
But instead I get:
Explanation
If import fails (wrong path or something) Jest output this test as Failed followed by stack trace, but doesn't count it this way in final report. So, I get
70 tests passed (70 total in 18 test suites, run time 16.805s)
and command line process exits with code 0. This is probably not an issue for local development, because Fail message is pretty obvious, but my CI thinks that everything passed because of code 0.The text was updated successfully, but these errors were encountered: