-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Workspaces generate inaccurate c8 coverage reports #3220
Comments
Hello @kherock. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
Does this still need a reproduction? I think the linked PR #3226 covers the problems I'm experiencing. |
There was a clear bug in how |
Here is a reproduction I created. I hope this can help to fix and test the bug Reproduce Steps: $ git clone https://github.com/issueset/vitest-workspace-c8-bug
$ cd vitest-workspace-c8-bug
$ pnpm install
$ pnpm run test:c8
$ pnpm run test:istanbul Open the report html files under |
Describe the bug
The C8 test coverage provider reports different statistics and inaccurate line numbers when the reporter runs on a workspace. When I preview the HTML report, the code highlighted is about 10 lines offset from where the actual uncovered code is. The column number offset also appear to shift 1 or 2 characters.
Reproduction
Vitest hangs when generating coverage in StackBlitz - I will provide a reproduction of this on GitHub when I have a chance.
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: