-
-
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
Coverage unknown with exclusion pattern in "testMatch" #7165
Comments
I'd like to give this one a shot, do you have any pointers? I have a feeling it is related to the patterns being "inverted" individually instead of as a unit when removing test files from coverage recording. |
@g-harel that would be great, after getting the repo running locally, I would start in the reporter here and work backward. You may end up here at some point |
Thanks, that's exactly where I needed to check! |
I'm still getting the exact same issue on Jest v24.3.1. Removing the exclusion pattern fixes it. Jest config: module.exports = {
setupFiles: ['<rootDir>/jest-env.js'],
testMatch: ['**/*.test.js', '!**/*.integ.test.js'],
testEnvironment: 'node',
verbose: true,
collectCoverage: true,
coverageReporters: ['text', 'html', 'lcov'],
coverageDirectory: 'coverage/unit',
}; Env info:
|
It seems to be working correctly in g-harel/jest-7165 with |
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
Coverage becomes unknown after adding an exclusion patter to the
testMatch
config option.To Reproduce
npm install
jest --coverage
(should show unknown coverage)11
inpackage.json
jest --coverage
(should show correct coverage)Expected behavior
Coverage report should be the same with or without the exclusion pattern.
Link to repl or repo (highly encouraged)
https://github.com/g-harel/jest-7165
Run
npx envinfo --preset jest
The text was updated successfully, but these errors were encountered: