vitest-dev / vscode

VS Code extension for Vitest
https://vitest.dev/vscode
MIT License
736 stars 83 forks source link

Support coverage-include and coverage-exclude #361

Closed RyanMulready closed 4 months ago

RyanMulready commented 4 months ago

Clear and concise description of the problem

https://vitest.dev/config/#coverage-include and https://vitest.dev/config/#coverage-exclude are not currently honored when doing a test coverage run.

This results in very different coverage percentages shown in the extension vs cli.

test: {
  coverage: {
    include: ['components/**'],
  }
}
image image

Suggested solution

Honor the include/exclude settings in coverage.

Alternative

No response

Additional context

No response

Validations

RyanMulready commented 4 months ago

Thank you for the fix @sheremet-va ❤️