-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
--all
flag fails to include tested files, sometimes displays no files at all
#849
Comments
Cannot reproduce on Windows with nyc 11.8.0:
|
However, UPD: That was 11.8.0, after upgrading to 12.0.2 even
|
Please see https://github.com/istanbuljs/nyc#require-additional-modules. I am able to see your issue, but I'm able to fix it by moving {
"scripts": {
"test": "mocha --require @babel/register",
"test:coverage": "NODE_ENV=test nyc -a npm test",
"test:coverage2": "NODE_ENV=test nyc -a mocha --require @babel/register"
}
} According to the documentation this would be more correct: {
"scripts": {
"test": "mocha --require @babel/register",
"test2": "mocha",
"test:coverage": "NODE_ENV=test nyc -a --require @babel/register npm run test2",
"test:coverage2": "NODE_ENV=test nyc -a mocha --require @babel/register"
}
} Important detail is that you have to pass |
Another unrelated note, babel-plugin-istanbul is currently written against babel 6. Using it in babel 7 doesn't seem to be causing any issues but I still wanted to mention. I have a PR to switch it to use babel 7 but that is not yet merged and will result in a semver-major version bump. |
Thanks, @coreyfarrell
I was facing this issue with the scripts above. When I changed it to
the library didn't show any inconsistency anymore :) |
…passed to nyc (see istanbuljs/nyc#849); increase code coverage
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Expected Behavior
nyc -a
should list all tested and untested files.Observed Behavior
nyc -a
only lists untested files when called against mocha directly. Tested files are not listed.nyc -a
lists no files when called againstnpm test
.Bonus Points! Code (or Repository) that Reproduces Issue
https://github.com/ralphholzmann/instanbul-bug
Forensic Information
Operating System: the operating system you observed the issue on.
Mac OS
Environment Information:
https://gist.github.com/ralphholzmann/aa66651e742688942556b42c690b5256
The text was updated successfully, but these errors were encountered: