question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Windows causes coverage to be 0%

See original GitHub issue

Link to bug demonstration repository.

https://github.com/michaelKurowski/lokim2/tree/nyc-issue-branch

Expected Behavior

  • npm i in the main directory
  • gulp 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:closed
  • Created 4 years ago
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
michaelKurowskicommented, Apr 18, 2019

Issue has been solved. I’ve had to run mocha directly in gulp serverTest instead of using npx

1reaction
coreyfarrellcommented, Apr 18, 2019

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found