-
-
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
No option to ignore path(s) when collecting test coverage #1191
Comments
I agree! Would you mind sending a pull request for this? This should be in the config and not part of the CLI and should be fairly straightforward to implement. I'd call it |
It'd be nice if it used minimatch as well and not regex. |
This unfortunately has to use regex to stay consistent with the rest of Jest. Changing Jest to other matching algorithms is part of our plan to rewrite configs, but shouldn't be done in this change :) |
This is going to be in #1233 and will be tagged soon! :) |
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. |
Currently the only option to not generate coverage for certain files or directories is to use the
--collectCoverageOnlyFrom
option in ourpackage.json
files. However, I ran into a problem when I wanted to test all js files in my codebase but just a couple files that are already being tested somewhere else (please don't ask why there are reasons behind that). IMHO, enumerating all those files wouldpackage.json
fileIn conclusion, I wish there was a
--collectCoverageIgnorePaths
option for developers.The text was updated successfully, but these errors were encountered: