node icon indicating copy to clipboard operation
node copied to clipboard

Test Runner: possibility to dump a file with coverage report

Open spamshaker opened this issue 1 year ago • 1 comments

What is the problem this feature will solve?

dump test coverage to a file in any possible format e.g text-lcov, json or any other known format https://node-tap.org/docs/coverage/ https://github.com/istanbuljs/istanbuljs/tree/master/packages/istanbul-lib-coverage https://github.com/istanbuljs/nyc

What is the feature you are proposing to solve the problem?

produce a test coverage data

What alternatives have you considered?

No response

spamshaker avatar Aug 09 '22 18:08 spamshaker

This can be achieved with https://www.npmjs.com/package/c8 Not sure if censoring this would be the right thing

MoLow avatar Aug 09 '22 20:08 MoLow

This can be achieved with https://www.npmjs.com/package/c8 Not sure if censoring this would be the right thing

@MoLow Thank you, I am sorry I missed that. This seems to be a resolution. It would be great if this package would be mentioned in the documentation, maybe here https://nodejs.org/api/test.html if it is not a problem. We may also close the request

spamshaker avatar Aug 10 '22 06:08 spamshaker

I don't think the node core documentation should include links to userland packages - for various reasons, but mainly there are a lot of opinions and ways to do things and node should not prefer one over another

MoLow avatar Aug 10 '22 08:08 MoLow

Agreed with @MoLow that highlighting some packages might create the wrong impression and understanding. A usual recommendation of mine: Check the Awesome Node.js GitHub repository. They cover a lot of specifics and common packages to achieve certain tasks 😄

ovflowd avatar Aug 10 '22 08:08 ovflowd

@MoLow, @ovflowd sure, thanks for your reply, all that make sense.

spamshaker avatar Aug 12 '22 18:08 spamshaker