nyc 15 gives no coverage without the useSpawnWrap option
See original GitHub issueLink to bug demonstration repository
https://github.com/adjerbetian/nyc-bug-demo-use-spawn
Expected Behavior
I would want to have the coverage, but I get nothing in the output
I tried to debug, and when I use the flag --use-spawn-wrap
I get the expected result:
📝 This problem does not occur on nyc@14
.
Observed Behavior
Troubleshooting steps
- run
npx nyc mocha
--> ❌ no coverage - run
npx nyc --use-spawn-wrap mocha
--> ✔️ coverage - still occurring when I put
cache: false
in my nyc config
Environment Information
System:
OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver)
CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
Memory: 10.25 GB / 31.07 GB
Binaries:
Node: 12.16.1 - /usr/bin/node
npm: 6.14.4 - /usr/bin/npm
npmPackages:
nyc: ^15.0.1 => 15.0.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
nyc 15 gives no coverage without the useSpawnWrap option ...
My desktop is Windows 10 10.0.19041.208, and the node.js environment is: node.js: 12.16.2, installed by nvs; npm: 6.14.4. The reproduce steps:.
Read more >node.js - No coverage nyc mocha - Stack Overflow
There is an issue with the nyc (Instanbul) loader for ESM modules. The recommended solution is to abandon nyc and use the native...
Read more >@cypress/code-coverage - npm Package Health Analysis | Snyk
Saves the code coverage collected during Cypress tests For more information about how to use this package see README. Latest version published 7...
Read more >Code coverage in 2 minutes with NYC - DEV Community
NYC is an npm package for getting stats about the test coverage working ... NYC to read the results from Mocha and it...
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 FreeTop 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
Top GitHub Comments
Thanks for the update. This is odd as I’m not seeing the issue using 12.16.1 on Fedora either. Without being able to reproduce I think we can close this issue, if you do ever see it again please be sure to post a new issue!
Worker threads are not supported by spawn-wrap at all. node-preload is the replacement, if it is failing in a case where spawn-wrap worked I need to see a reproducible demo suit can be fixed. Be aware spawn-wrap fails in many situations, especially on Windows.