Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coverage #7

Closed
patak-dev opened this issue Dec 4, 2021 · 1 comment
Closed

Coverage #7

patak-dev opened this issue Dec 4, 2021 · 1 comment

Comments

@patak-dev
Copy link
Member

@antfu creating an issue to be able to leave some links here. I won't be able to implement this myself, but I checked a bit what is needed and maybe some of these notes end up being useful.

Jest implements coverage using babel, but it can use v8 as an experimental provide. Given that native v8 code coverage is a lot faster, and that in newer versions of node it should work well, I think that vitest should use native v8 coverage directly.

This is the PR where v8 coverage was added to Jest jestjs/jest#8596

There are a few libs that were created as part of this process

There seems to be a merging needed of the generated reports, and there are a few libs to merge both the V8 format and the Istanbul format. I wonder if there is a way to generate the report without bringing Istanbul here

@patak-dev
Copy link
Member Author

Probably a better place to look at is the web test runner coverage implementation https://github.com/modernweb-dev/web/blob/master/packages/test-runner-coverage-v8/src/index.ts, also doing what is described above

@antfu antfu mentioned this issue Dec 6, 2021
Closed
@antfu antfu closed this as completed in ffa268f Dec 7, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jun 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant