-
-
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 exit code 1 if coverage threshold requirements are not met on [email protected] #3520
Comments
Cannot repro, fails with exit code 1 for 3 different projects. Have you tried purging node_modules? |
I have the same issue. Downgrading from |
See: jestjs#3520 Fixed async calls to each reporter onRunComplete method
@thymikee You should reproduce the issue by setting the The Coverage reporter will not return a resolved promise when |
* Return failure when coverage threshold isn’t met See: #3520 Fixed async calls to each reporter onRunComplete method * Run prettier
* Return failure when coverage threshold isn’t met See: jestjs#3520 Fixed async calls to each reporter onRunComplete method * Run prettier
* Return failure when coverage threshold isn’t met See: jestjs#3520 Fixed async calls to each reporter onRunComplete method * Run prettier
I'm having the same issue, the merged PR doesn't seem to have fixed this for me. I'm going to do some more poking around |
Just a follow up in case anyone is brought here by Google: Removing the
To package.json (I'm using yarn), to make sure I was using the right version of jest. I'll take a deeper look why removing |
I don't have the |
Changed script to execute independently of jest error code. Looks like jest returns exit code 1 if coverage is under the defined goal when running in npm scripts: jestjs/jest#3520
I still have this issue with [email protected]. Do I need to open a new issue? |
@Sufiane yes, please open a new issue if you have a reproduction on the latest Jest version 👌 |
@rickhanlonii thanks for the response, i have done so. You can find the new issue here: #7450 |
This worked for me, using react tests |
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. |
Whenever the --coverage flag is passed, jest exits with 0 even if the threshold requirements are not met, but it should return non-zero exit code.
Worked before upgrade to [email protected].
The text was updated successfully, but these errors were encountered: