-
-
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
Return error code 1 when coverage fails #526
Comments
👍 I'm also interested in this feature. It would also be useful to be able to specify arbitrary threshold values like karma-threshold-reporter: thresholdReporter: {
statements: 90,
branches: 60,
functions: 85,
lines: 90
} |
Agreed! I haven't heard from @koddsson since he initially started his pull request. |
Sorry! I've been super busy at work but I definitely wanna try to finish off #556 soon. I'm hoping I can get to it this week or at the weekend 🙏 |
Has this wonderful feature been finished? Really want to see features like this: thresholdReporter: { |
I'm happy to accept pull requests for this feature! |
I agree with @elliottsj |
This will be part of the 12.1.0 release sometime this week. Thanks to @bookman25 for implementing this feature! |
Summary: Added support for specifying global coverage thresholds. If the thresholds aren't met, then jest should exit code 1. Closes #924 Differential Revision: D3302385 fbshipit-source-id: d54938d68d845c64d2c8cc66d6d0e0bd8604c57e
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. |
I've set up jest as a pre-commit hook to make sure to run the tests I have before commit locally. I'd like to keep my coverage up so it would be neat if jest would not return exit code 0 when coverage is less than 100%.
This should probably be behind a command line flag for people that actually want this behavior.
The text was updated successfully, but these errors were encountered: