-
-
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
Since Jest 23.2.0: "Coverage data for global was not found." #6563
Comments
@Vinnl I suspect that this is due to ts-jest not being compatible with jest 23. There is an issue on the ts-jest repo to investigate compatibility. kulshekhar/ts-jest#589 |
I got the same issue and I just use pure javascript. |
I'm having the same issue, dropping down to [email protected] resolves the issue. Any version at 23.x.x gives me the same problem. Maybe config options have changed? |
I notice 23.x.x add a options |
With pure javascript, I also received the
{
"name": "my-package",
"version": "0.0.0",
"private": true,
"scripts": {
"test": "jest",
"test:coverage": "jest --coverage",
"report-coverage": "npm run test:coverage && cat ./coverage/lcov.info | codecov",
},
"jest": {
"coverageThreshold": {
"global": {
"branches": 50,
"functions": 50,
"lines": 50,
"statements": 50
}
},
"collectCoverageFrom": [
"src/**/*.{js}",
"!**src/config/*.{js}",
"!**src/config/*/*.{js}",
"!**src/docs/*.{js}",
"!**src/models/*.{js}"
]
},
"devDependencies": {
"codecov": "^3.0.3",
"eslint": "^4.19.1",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-prettier": "^2.6.2",
"jest": "^23.3.0",
"prettier": "^1.13.7"
}
} For now, we have rolled back to |
I've found the issue. As part of #6400, For example, @jongear, in I'll open a PR to revert In the meantime, individuals can fix their issue by assuring that your glob patterns work in version 3. |
That's fantastic @Tvrqvoise, I don't know how you managed to track that down, but I can confirm that updating the glob patterns fixed it for me. Although |
I think we should file a PR to the changelog within |
I'm open to a revert, then upgrade it for Jest 24 along with the awesome explanation @Tvrqvoise provided about the gotchas. It's obviously super breaking, and landed in a minor (#6400). |
Due to breaking changes in an upgrade of the dependency micromatch from ^2.3.11 to ^3.1.10 many users saw their coverage reporting failing because their glob matching was in an unsupported format. Adding the help text here gives users a good starting point for debugging when they run into issues concerning this option. This should help alleviate support issues created concerning this configuration option. Issue jestjs#6563 is a good example of what could be avoided in the future with this addition to the documentation.
## Summary As part of #6400, `micromatch` was updated. While `micromatch`'s CHANGELOG claims that this is safe, several regressions have been noted in cases where users relied upon invalid glob patterns. For example, these patterns would all match `src/foo/bar/baz.js`, but no longer do: - `src/**/*.{js}` - `src/**.js` - `src/**/*.{js|ts}` Fixes #6563 Fixes #6546 ## Test plan Unit tests were added which demonstrate the known cases.
Due to breaking changes in an upgrade of the dependency micromatch from ^2.3.11 to ^3.1.10 many users saw their coverage reporting failing because their glob matching was in an unsupported format. Adding the help text here gives users a good starting point for debugging when they run into issues concerning this option. This should help alleviate support issues created concerning this configuration option. Issue jestjs#6563 is a good example of what could be avoided in the future with this addition to the documentation.
…om (jestjs#6563) Due to breaking changes in an upgrade of the dependency micromatch from ^2.3.11 to ^3.1.10 many users saw their coverage reporting failing because their glob matching was in an unsupported format. Adding the help text here gives users a good starting point for debugging when they run into issues concerning this option. This should help alleviate support issues created concerning this configuration option.
Due to breaking changes in an upgrade of the dependency micromatch from ^2.3.11 to ^3.1.10 many users saw their coverage reporting failing because their glob matching was in an unsupported format. Adding the help text here gives users a good starting point for debugging when they run into issues rlated to this option. This will help alleviate support issues (such as jestjs#6563) concerning this configuration option.
fix an issue related to jestjs/jest#6563
Took me a while, but I reported an issue: micromatch/micromatch#133 (I did not submit a PR to the CHANGELOG yet, since I cannot exhaustively list the ways the globbing patterns have been restricted.) |
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
This is going to be somewhat of a difficult bug report since there's many moving parts and I'm not sure which causes it, but since upgrading Jest from 23.1.0 to 23.2.0, I'm currently running into the following error on one of my projects:
Apart from the upgrade (which did encompass quite a few packages to be upgraded along with
jest
proper), nothing changed in my setup.I'm using TypeScript with ts-jest, if relevant.
To Reproduce
Unfortunately I wouldn't know how to reproduce this in a fresh repo...
Expected behavior
Tests to succeed (which is happening now) and coverage to be 100% everywhere.
Link to repl or repo (highly encouraged)
Not minimal unfortunately, but as I referenced above:
git clone -b deps/update-46517a0f [email protected]:Flockademic/Flockademic.git
.Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: