You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a poorly-documented feature of the HTML Istanbul reporters (html, lcov, html-spa) called "defaultSummarizer". It would be nice if c8 could pass through this configuration option so it can be used.
I am willing to create a pull request for this issue myself.
If you feel like changing for another v8-driven code coverage tool, you can give One Double Zero a try. I just tested and it passes through any reporter options that it receives:
Note that I didn't know about that option and I have to thank you for that: the nested layout is the one I've been dreaming of ever since I've started using istanbul. 🙏
If you feel like changing for another v8-driven code coverage tool
@ericmorand I haven't been putting work into open source, so I deserve this... But, using my repos to advertise your own open source projects is still a little gauche 😛
There is a poorly-documented feature of the HTML Istanbul
@miyasudokoro send me a patch and I will happily expose this 👏
The test "should allow for multiple overrides of src location for --all" does not pass and I don't know why or how to fix it.
If you start with a fresh checkout (make sure there's no local coverage, tmp, folder etc., ) and run npm ci, npm t should pass.
How do I add a test for defaultSummarizer?
To add new tests, you write the test first and then run npm run test:snap to capture the new snapshot. You then just use a visual diff to make sure it looks reasonable.
Activity
ericmorand commentedon Oct 26, 2024
If you feel like changing for another v8-driven code coverage tool, you can give One Double Zero a try. I just tested and it passes through any reporter options that it receives:
{ "sources": [ "./src/main/{.,!(target)/**}/*.ts" ], "reporters": [ "html", "text" ], "reporterOptions": { "html": { "defaultSummarizer": "nested" } } }It is worth noting that the
reporterOptionsis not documented, which will be fixed: https://gitlab.com/nightlycommit/one-double-zero-documentation/-/issues/2Note that I didn't know about that option and I have to thank you for that: the
nestedlayout is the one I've been dreaming of ever since I've started using istanbul. 🙏feat: bcoe#547 add default-summary to report configurations
bcoe commentedon Dec 10, 2024
@ericmorand I haven't been putting work into open source, so I deserve this... But, using my repos to advertise your own open source projects is still a little gauche 😛
@miyasudokoro send me a patch and I will happily expose this 👏
miyasudokoro commentedon Dec 13, 2024
@bcoe I've never done any testing with "snapshots" before, so I don't know how to finish. (See my commit above.)
bcoe commentedon Dec 20, 2024
@miyasudokoro I created a draft PR here you could use for a starting point, if your'e so inclined:
#554
bcoe commentedon Dec 21, 2024
@miyasudokoro re:
If you start with a fresh checkout (make sure there's no local
coverage,tmp, folder etc., ) and runnpm ci,npm tshould pass.To add new tests, you write the test first and then run
npm run test:snapto capture the new snapshot. You then just use a visual diff to make sure it looks reasonable.