sindresorhus / generator-nm

Scaffold out a node module
MIT License
743 stars 82 forks source link

Use c8 instead of nyc for code coverage #87

Closed sholladay closed 5 months ago

sholladay commented 2 years ago

Inspired by: https://github.com/avajs/ava/pull/2843

I'm actually having problems with nyc while on the AVA 4 release candidate, where the coverage table is empty, presumably having something to do with AVA now using worker threads instead of child processes. I tried c8 and it just works, including on AVA 3.

One caveat: c8 seems to be quite a bit slower, at least in a medium sized app where it adds almost 30 seconds to npm test compared to without coverage, while nyc adds less than 10 seconds (including on AVA 3 where it works properly).

sindresorhus commented 2 years ago

Yeah, I want to switch to c8.

sindresorhus commented 2 years ago

One caveat: c8 seems to be quite a bit slower, at least in a medium sized app where it adds almost 30 seconds to npm test compared to without coverage, while nyc adds less than 10 seconds (including on AVA 3 where it works properly).

I'm ok with that. It will probably be improved in the future.

sindresorhus commented 5 months ago

Closing as this repo is archived.