-
-
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 doesn't print an error on a default settings #3893
Comments
cc @aaronabramov who should be able to explain it nicely. |
i'm pretty sure this should fix the issue #3895 the original problem was in that we had to additionally buffer and debounce
|
closing it, since the fix was merged already |
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. |
So this was pretty annoying-we have a functional api test which runs our API(actually listening http server) and one of the tests were failing but without any info. The terminal looked like this:
it just ends and doesn't print anything.
So I dug into the codebase and tried fiddling with configs. I had a suspect- the famous BufferedConsole class that jest uses to make logs nice as they run in paralell. In couple of minutes, when I failed to try to remove console buffering I tried to set
"useStderr": true,
and well fair enough now jest does print an error stack trace:
this was on jest 20.0.4 and node.js version 8.1.0. I did use a
hard-rejection
npm module to make my process crash any time a promise rejection is unhandled. Without this module my test did run into a timeout instead if crashig, but that is a subject of another issue I believe.Why does
useStderr
default to false? Why would I even want to use the default value when it makes me blind in debugging my tests?In the documentation this option is just described with a single short sentence which doesn't really capture the importance of this settings. How about something along the lines of:
if your test is failing without any error message you might want to turn this ON
The text was updated successfully, but these errors were encountered: