-
-
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
true coverage at launch --change #6020
Comments
To fix this we'll need to make major changes to That would change what files are run with Also noted at #5314 (comment):
|
The team decided that this is not something that we will be implementing. By implementing this users would very likely run into cases where most tests of the code base end up running due to file dependencies. For example if your new test is testing file that imports a common utility package, this change would make Vitest run all the test files that depend on that utility package in any way. It eventually ends up matching test run without This is also something that Jest does not implement so alignment is OK. |
@AriPerkkio can then show coverage only for changed files? only for those for which tests are run? |
Using If the test files that |
@AriPerkkio how do I automatically generate a list --coverage.include=file_name from the modified files of the feature and develop branch ? |
That sounds like something |
Clear and concise description of the problem
when I launch vitest coverage --change=develop . I want there to be a true coverage of those files that are shown in the coverage. Now the dependency files that have not been changed do not correctly show the coverage. It is worth 0 in functions. If you run the full coverage, then there is not 0.
Suggested solution
I can't say exactly how to do it, but it may be worth running tests for those files that are included in the coverage statistics so that the coverage is true.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: