-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Provider v8 does not show test coverage #3555
Comments
The configuration file sets The The reason why this happens on |
That is, the current behavior of v8 is correct and there is no error? If so, then I'll just fix my config under the root directory of the project. |
The current behaviour is correct and no code changes to Vitest are needed. To summarize, when you have following configuration: test: {
root: './tests/',
coverage: {
include: ['**/src/**'], This will include all files in |
Describe the bug
The
@vitest/coverage-v8
and@vitest/coverage-c8
packages are expected to provide identical coverage and test results. But that doesn't happen.Package
@vitest/coverage-v8
does not work correctly in terms of coverage for sure. Package@vitest/coverage-c8
is more accurate - sees all uncovered and skipped areas in Vue templates, takes into account missing test files and overall coverage.Other things being equal settings, package
@vitest/coverage-v8
simply always passes the tests and never outputs missing lines or coverage problems.Reproduction
A simplified example is in the repository.
Install dependencies:
yarn
Running tests:
yarn unit
We see a report:
We go into the config and change the coverage provider from v8 to c8. Run the tests again and see the following report:
Conclusion: at the moment v8 does not show coverage in principle
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: