Skip to content
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

Coverage check out-of-box #1673

Closed
ai opened this issue Sep 11, 2016 · 4 comments
Closed

Coverage check out-of-box #1673

ai opened this issue Sep 11, 2016 · 4 comments

Comments

@ai
Copy link
Contributor

ai commented Sep 11, 2016

Do you want to request a feature or report a bug?

Feature request

What is the current behavior?

It is awesome, that Jest have many tools out-of-box. For example, --coverage. But what is a point to have coverage if you can’t check it in CI? :)

What is the expected behavior?

Add --coverage --statements 100 options. And exit with non-zero exit code on smaller coverage results.

@ai
Copy link
Contributor Author

ai commented Sep 11, 2016

Right now my workaround:

    "check-coverage": "istanbul check-coverage --statements 100",
    "test": "jest --coverage && npm run check-coverage && npm run lint && npm run docs"

But it requires extra istanbul dependency.

I agree that it is not big deal. But if we have build-in --coverage, I think we should have built-in coverage check.

@cpojer
Copy link
Member

cpojer commented Sep 11, 2016

There is a coverageThreshold configuration option for this. http://facebook.github.io/jest/docs/api.html

@cpojer cpojer closed this as completed Sep 11, 2016
@ai
Copy link
Contributor Author

ai commented Sep 11, 2016

Wow. Thanks.

@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants