Describe the bug
When running a coverage report using instanbul or c8, modules that aren't tested aren't being shown in the report. This could mean I have a partially tested codebase but still get a 100% code coverage report. This could be particularly troublesome if you have a large codebase and a small number of files are not tested (e.g. after a refactor). These could be quite easily missed, while the user sees 100% code coverage.
In jest, this is usually solved with the "collectCoverageFrom" option which allows for specifying a pattern to match files that should be analysed for coverage. Perhaps a similar setting could be introduced.


Note: ErrorBoundary and FallbackComponent are used in the application but not imported by any .test.* module
Reproduction
To reproduce, run a coverage report using vitest with a module that is tested and a module that is not. The untested module does not appear in the coverage report, but it should as it may still be used by the application. This can lead to false coverage reports.
If further reproduction is required, I'm happy to submit a minimal reproduction sometime soon but need sleep right now..!
System Info
Used Package Manager
npm
Validations
Describe the bug
When running a coverage report using instanbul or c8, modules that aren't tested aren't being shown in the report. This could mean I have a partially tested codebase but still get a 100% code coverage report. This could be particularly troublesome if you have a large codebase and a small number of files are not tested (e.g. after a refactor). These could be quite easily missed, while the user sees 100% code coverage.
In jest, this is usually solved with the "collectCoverageFrom" option which allows for specifying a pattern to match files that should be analysed for coverage. Perhaps a similar setting could be introduced.
Note: ErrorBoundary and FallbackComponent are used in the application but not imported by any
.test.*moduleReproduction
To reproduce, run a coverage report using vitest with a module that is tested and a module that is not. The untested module does not appear in the coverage report, but it should as it may still be used by the application. This can lead to false coverage reports.
If further reproduction is required, I'm happy to submit a minimal reproduction sometime soon but need sleep right now..!
System Info
Used Package Manager
npm
Validations