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
Use c8 for coverage instead of nyc #493
Comments
Either wait for Node v10 to fall off LTS, or fork based on Node version and use nyc/c8 as appropriate. |
According to c8 Supported Node.js Versions it should be possible to use c8 on Node.js back to 10.12.0, which came before LTS (10.13.0) and security updates (10.14.0). And according to Node.js Release Schedule, Node.js pre-10 will reach EOL this year.
Any reason to run coverage on Node.js pre-10? |
Oh, I guess we can do it as of node version 10, then! |
Yeah? I personally think you should always run tests with coverage. It's going to become the default in tap v13. |
Got it (missed the built-in test coverage). "Use nyc/c8 as appropriate" would solve this problem, which would go away with Node.js 8 EOL in less than 1 year. Hope this would not add too much complexity:)
Ugly alternative would be to make a temporary fork |
I have it on excellent authority that the c8 PR will land long before I get around to doing any of this :) |
Any update on this? |
You should be able to use I'm not aware of any firm plans to move forward with switching to c8 now, as of right now the tap v15 WIP branch is upgrading nyc to 15.x. Any further updates will be posted here. |
I'd also favour making the coverage backend configurable. Running with no-cov and piping, works, however not with --watch. I face a lot of challenges with |
This is in tap 18. |
@isaacs do you have a link to the commit where the switch from
|
@bennycode Well, there isn't so much "a" commit as much as "completely rewrote tap, using @tapjs/processinfo, which uses the V8 coverage API directly". When building the @tapjs/run component, I made it pull in C8's If you're just switching from nyc to c8, and you're using nyc directly like |
Thanks a lot for your answer! Switching from I can now run my tests with good ol' Jasmine in a TypeScript project that has ESM import/export syntax: {
"scripts": {
"test": "c8 --config=.c8rc.coverage.json ts-node-esm ./node_modules/.bin/jasmine --config=jasmine.json"
}
} Thanks for your help! 👍 |
This should produce the same coverage output, but run much faster.
Need bcoe/c8#59 to land so we can do
--100
.The text was updated successfully, but these errors were encountered: