Incorrect coverage when running in nested folder
See original GitHub issueDo you want to request a feature or report a bug? Bug
What is the current behavior?
- jest doesn’t collect coverage files correctly when collectCoverageFrom is not specified
- even when collectCoverageFrom is specified the report is incorrect
If moving jest and configuration to root, works as expected
**If the current behavior is a bug, please provide the steps to reproduce and https://github.com/federicobarera/jest-coverage-repro
(master) not-working (correct) working
What is the expected behavior? Correct coverage
Please provide your exact Jest configuration Included in the repo
Run npx envinfo --preset jest
in your project directory and paste the
results here
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Getting incorrect coverage report for no matter what module ...
I am trying to use coverage to track code coverage while running ... ignore_errors=False [html] directory=/opt/ coverage/coverage_html.
Read more >Improve Code Quality Using Test Coverage - CODE Magazine
Condition coverage is a measure that tells you whether every Boolean sub-expression within a program has evaluated to both true and false ......
Read more >Code coverage analysis data ignored for source files
I am facing a problem with generating a coverage report for our ... I am running “ceedling gcovr” in the sub-folders of the...
Read more >Full code-coverage with Jest - tsmx
js in the main folder of your NodeJS project. Covering your code with Jest. Initial setup and test function touch. To get Jest...
Read more >Triple combined code coverage for React Apps with Jest ...
"Engineering is about assuming stuff will go wrong and learn from that ... Run the component tests with yarn cy:run-ct . coverage-cy folder...
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
Hey, just a heads up, we managed to fix the ‘issue’ changing the
rootDir
back to the real root of the project (and re adjusting the other paths accordingly).We also noticed that other tools tend not to work as expected when the config files / runners are not in root (eg. babylon-jest). It might just be a non common folder structure.
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.