Windows causes coverage to be 0%
See original GitHub issueLink to bug demonstration repository.
https://github.com/michaelKurowski/lokim2/tree/nyc-issue-branch
Expected Behavior
npm iin the main directorygulp prepareDev- put some mongodb credentials into
src/server/config.json(mlab provides free ones, I can also send credentials to a free instance created there) gulp serverTestCoverage- I should see a table with files covered with realistic results. Something like that: https://gist.github.com/michaelKurowski/09e493010cfe6ac5faa0c823f4605845
Observed Behavior
Everything works flawlessly on Linux, but on Windows I get a corrupted report: https://gist.github.com/michaelKurowski/a562595264d935b22d57f79daeaeefb6
Forensic Information
Operating System: Observed on Windows 7 and 10 Environment Information: https://gist.github.com/michaelKurowski/01980c68ac8916605b36292f33f77504
Issue Analytics
- State:
- Created 4 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
Windows shows 0 coverage when runing with npm/yarn #1076
Observed Behavior. When running tests on Windows, the coverage is 0. $ yarn test yarn run v1.12.1 $ cross-env NODE_ENV=test ...
Read more >Code coverage is at 0% after the latest visual studio update.
After the latest visual studio update code coverage is at 0% now. The last version of visual studio that worked for me was...
Read more >code coverage always 0% - MSDN - Microsoft
I am trying to get code coverage number using VS2008, and I am always getting 0 and ... Is there any known reasons...
Read more >Which States Have Zero Deductible For Auto Glass?
Several states allow for a zero dollar deductible for auto glass, including KY, AZ, SC, NY, MA, FL, and CT. Each state has...
Read more >Jacoco Test Coverage always 0% on Linux; Windows works
I can't find a solution because it seems to be caused by the operating system (Same tests work on a windows machine). Can...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Issue has been solved. I’ve had to run mocha directly in
gulp serverTestinstead of usingnpx@calebcartwright OP has experienced the issue with nyc@11. If you are only experiencing the issue with nyc@14 then it’s definitely a different issue, even if it has some of the same symptoms.