-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Code coverage reporting breaks with multi-project runner + lerna and some Jest configurations #6506
Comments
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 14 days. |
This issue was closed because it has been stalled for 7 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
We recently found, after migrating multiple projects to a monorepo, that code coverage reporting can miss projects under test when Lerna is used and Jest is invoked with specific combinations of CLI flags.
To Reproduce
npm install && npm run bootstrap
npm run test:nocache
, and note in stdout thatproject1/index.js
andproject2/index.js
both have 100% coverage. This is the result of running the tests with the--no-cache
flagnpm run test:cache
, and note in stdout we only see code coverage for 1 project. This is the result of running the tests with no flagsnpm run test:ohno
, and note in stdout we only see code coverage for 1 project. This is the result of running the tests with--no-cache
and-i
Expected behavior
Jest's code coverage reporting, when using the multi-project runner, should be identical, regardless of whether caching or run-in-band is enabled or disabled.
Link to repl or repo (highly encouraged)
https://github.com/DrewML/jest-coverage-bug-repro
Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: