Support Jest coverageThreshold option
See original GitHub issueI would like to configure the coverage threshold from jest
to be able to launch jenkins from CI with a 90-100% coverage.
Can we have support for this in Create react app ?
What is the most relevant:
- Overriding some part of the config ? https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/scripts/test.js#L34 I can do a PR fo it
- Keep it like this and I have to override the whole configuration with
--config="{}"
frompackage.json
?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:10
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Configuring Jest
coverageThreshold [object] ... This will be used to configure minimum threshold enforcement for coverage results. Thresholds can be specified as ...
Read more >Configuring code coverage in Jest, the right way
Key takeaway: always configure coverageThreshold in your Jest config to ensure a coverage baseline. Conclusion. If you're using Jest, here are ...
Read more >Configuring package.json · Jest
Note: Setting this option overwrites the default values. Add "text" or "text-summary" to see a coverage summary in the console output. coverageThreshold [object] ......
Read more >node.js - Applying jest coverageThreshold to aggregated report
Instead of combining the tasks, combine only the pathPattern. You can try to create a single task for group1 and group2 something like...
Read more >jest-coverage-thresholds-bumper - npm
Tool supports jest.config.json and jest.config.js configuration files, as well as jest section in package.json .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Jest configurability would be excellent, thanks!
For now, this is how we achieve coverage threshold checking on CI:
@gaelduplessix We intend to add some configurability in the future. I’m not closing the issue but now is not the time yet. Perhaps in a few months when more things shake out (e.g. Jest has been going through a ton of changes recently).