feedback icon indicating copy to clipboard operation
feedback copied to clipboard

Add coverage processing for new Node test runner

Open thomasrockhu-codecov opened this issue 2 years ago • 4 comments

What product do you want to improve? I wonder if it's possible to use codecov with the node's new test runner: https://nodejs.org/api/test.html#collecting-code-coverage

I've tried following:

nyc --reporter=lcov node --test --experimental-test-coverage

— but nyc doesn't seem to pick anything.

Running just node --test --experimental-test-coverage works locally, though.

Here is the full yml script I'm trying to make work: https://github.com/Elringus/DotNetJS/blob/feat/revamp/.github/workflows/cover.yml (tests are here: https://github.com/Elringus/DotNetJS/tree/feat/revamp/JavaScript).

--- Tom --- This may be due to configuration with nyc and not with Codecov at all.

Is your feature request related to a problem? Please describe. The current problem is that Codecov does not properly ingest this coverage report

Describe the solution you'd like Codecov ingests the new coverage report format

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context This is pulled from a community board post.

thomasrockhu-codecov avatar Oct 19 '23 21:10 thomasrockhu-codecov

Node's test runner can do this without nyc. Let me go locate the syntax.

drazisil-codecov avatar Oct 20 '23 16:10 drazisil-codecov

c8 https://github.com/bcoe/c8

is a thing, see https://github.com/drazisil/toot-sweet/blob/dcb93b412424425c0fa49b8cd52871da0c5b157d/package.json#L16C18-L16C20 as an example.

However, I think c8 was being replaced by something even more native. Can't find it though. Maybe I dreamed it. C* works well though. Ish. (please don't ask about the ish)

drazisil-codecov avatar Oct 20 '23 16:10 drazisil-codecov

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

covecod[bot] avatar Nov 30 '23 08:11 covecod[bot]

not stale

thomasrockhu-codecov avatar Nov 30 '23 23:11 thomasrockhu-codecov

stale

thomasrockhu-codecov avatar Jun 18 '24 16:06 thomasrockhu-codecov

Also, node --test outputs in the same coverage format as other tools, so no action needed.

drazisil-codecov avatar Jun 18 '24 16:06 drazisil-codecov