-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Setting "coverageReporters" : ["json"] causes code coverage to not run #8563
Comments
According to the official docs:
e.g. As for the blank output in json file, the problem might be no test matching the pattern with |
If no test matched then coverage is empty (contains |
This comment has been minimized.
This comment has been minimized.
at all related to #9319 ? |
How to translate : coverageReporters: ['json', { file: 'xxx.json' }] |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
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. |
🐛 Bug Report
Setting "coverageReporters" : ["json"] in the package.json file causes the code coverage to partially run.
To Reproduce
Setup any vanilla nodejs installation with the below JEST configuration in your packages.json file.
"jest": { "collectCoverage": true, "coverageDirectory": "../coverage", "testPathIgnorePatterns": [ "/node_modules/" ], "coverageReporters" : ["json"], "verbose": true, "coverageThreshold": { "global": { "branches": 50, "functions": 50, "lines": 50, "statements": 50 } } },
Expected behavior
The coverage report file should contain the code coverage values and the code coverage results should still be outputted to the console as occurs when "coverageReporters" is omitted.
The text was updated successfully, but these errors were encountered: