-
-
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 code coverage #632
Comments
Hey! Which version of node, npm and jest are you using? |
Last jest, last node 5.x and last npm 3.x |
This is not great. Can you try running jest with |
Yes, tried the same doesn't get more. I will make you an example yes |
Add "collectCoverageOnlyFrom": {
"index.js": true,
"MyFolder/index.js": true
} etc |
I found following lines in file const onlyCollectFrom = this._config.collectCoverageOnlyFrom;
const shouldCollectCoverage =
this._config.collectCoverage === true && !onlyCollectFrom
|| (onlyCollectFrom && onlyCollectFrom[modulePath] === true);
|
I confirm that when I list every file by hand, it's working. I've tried with a small extract of the project, but here I get the coverage without listing. I bet it was because of paths but after a day passed on it with a colleague, not found where is the difference... |
same problem described here #433 as workaround you can create fake tests/package.json with {} inside. In this case node-haste create correct requiredModules and you will see coverage for all files (direct dependent from test file). |
Also running into this issue. Listing the direct paths under |
I'm also running into this issue. Getting 100% across the board when I actually only have partial tests on a single file. |
Fixed by 0.9.0. |
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. |
Hi, I have a problem with code coverage. This the tests results :
All my tests succeed (count 73 expect). But no cover. I'm just testing normal node code. I use babel-jest, here you have the config in package.json :
Here is my project architecture :
The tests/unit folder contains the same architecture as app folder as you can see.
Have you an idea about why I don't have any reports ? Thanks in advance !
The text was updated successfully, but these errors were encountered: