How to set coverageThreshold with CLI
See original GitHub issueAs the code, https://github.com/facebook/jest/blob/3e805bc082c8da90c33a4dff9d3e1b0804a4386d/packages/jest-cli/src/cli/args.js#L211
The argument should be a JSON string, but the below command always doesn’t work.
jest --coverage --coverageThreshold='{\"global\":{\"branches\":90,\"functions\":90,\"lines\":90,\"statements\":90}'
It should be failed since it does not reach the target. However, it is always successful.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Configuring code coverage in Jest, the right way
In this brief tutorial we see how to configure code coverage for Jest, the right way. ... In Jest we can configure coverageThreshold...
Read more >How do i set threshold per each file using nyc Istanbul CLI ...
I'm able to set coverage threshold globally, but how can i set threshold per file basis or get the coverage percentage correctly in...
Read more >Jest CLI Options
The jest command line runner has a number of useful options. You can run jest --help to view all available options. Many of...
Read more >coverage-threshold - PyPI
Tools for coverage threshold limits. ... pip install coverage-threshold ... src/cli/my_command.py"] file_line_coverage_min = 100 ...
Read more >Configuring package.json · Jest
Add "text" or "text-summary" to see a coverage summary in the console output. coverageThreshold [object] #. Default: undefined. This will be used to...
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 Free
Top 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
Hey, I actually don’t see this in the docs. https://jestjs.io/docs/en/cli.html#options Perhaps cli docs are out of date?
On Windows I had to escape
\
which results