Skip to content

Support for c8 code coverage as an option #588

Closed as not planned
Closed as not planned
@mikeybinns

Description

@mikeybinns

Is your feature request related to a problem? Please describe.
Code coverage using istanbul / nyc requires implementing an extra build step to instrument your code, but c8 uses native V8 coverage metrics in any version since Node.js >= 10.12.0, which doesn't require instrumenting your code.

Describe the solution you'd like
Support for using coverage reports generated only using c8, removing the need to install istanbul and nyc into the build tool.

I believe this is possible as an option because vitest supports both istanbul and c8 via different coverage plugins, so theoretically, it's possible. That being said, I am not well versed on coverage tools, so it's entirely possible I'm asking for the moon here, let me know if that's so.

Also, based on the fact that cypress doesn't load the code for you, you must start your own server, this could mean that it requires starting the server with c8 to ensure it's generating the reports needed by cypress, but as long as cypress can read the reports, and documents that the server must be started a certain way, I don't see this as an issue.
e.g. my app is a remix app, so I'd have to load the app using c8 remix dev instead of remix dev for this to work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions