-
-
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
collectCoverageFrom ignored in monorepo #8207
Comments
I can reproduce this. Discovered after adding a new file to a monorepo that I expected to break coverage, but it didn't. I created a test case repo to reproduce: https://github.com/iturgeon/jest-collect-coverage-monorepo
|
Any update on this? Monorepo support from Jest has been terrible for us, this is one more issue to get around. |
I did seem to find an alternative way of setting up the project that allowed us to collect the coverage. Only thing is that jest has quite a slow performance in a monorepo setup. Give this thread a comment and i will upload the example |
@RuneKR could you please share your solution? We also struggle with jest in a monorepo project 😞 |
Hi, This is the workaround: https://github.com/RuneKR/bad-performance/tree/fix/test-coverage It only works if you tests from at least one package for some reason. I really need to deep dive for a proper fix. |
I can give another example of repo to reproduce: git clone
npm i
npm bootstrap
npx jest --coverage
cd packages/core
npx jest --coverage (it will fail to compile on coverage, check only the coverage table entries) The workaround of using coverage on seperate folders currently doesn't work with I am willing to help if one of the maintainer will point the places to dig 😉 |
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
Migrating from v23 to v24 of jest i have noticed that collectCoverageFrom stopped working for my mono repo.
To Reproduce
Please follow steps in example: https://github.com/RuneKR/bad-performance/tree/fix/jest
Expected behavior
Cover coverage would be collected
Run
npx envinfo --preset jest
Paste the results here:
System: OS: macOS High Sierra 10.13.6 CPU: (4) x64 Intel(R) Core(TM) i5-2500S CPU @ 2.70GHz Binaries: Node: 8.11.1 - /usr/local/bin/node npm: 6.6.0 - /usr/local/bin/npm npmPackages: jest: ^24.5.0 => 24.5.0
The text was updated successfully, but these errors were encountered: