Description
Please provide the environment you discovered this bug in.
https://stackblitz.com/~/github.com/BlindDespair/analogjs-vitest-nx-coverage-bug
For me for some reason the nx commands are not running in Stackblitz, so here's also a GitHub repo:
https://github.com/BlindDespair/analogjs-vitest-nx-coverage-bug
Which area/package is the issue in?
vitest-angular
Description
When using the @analogjs/vite-plugin-angular
plugin in vite.config.mts
and running tests in NX monorepo with coverage, the coverage is only available for the files that already have tests but not for the rest of them. vite.config.ts specifies all the configs for vitest including coverage. Setting includes
and all
has no influence over the result. I also tried changing the runner to:
"executor": "@analogjs/vitest-angular:test",
"options": {
"coverageArgs": {
"all": true
}
}
and still no luck.
Coverage output looks like this:
But it should be like this (this is when the plugin is removed, but then of course can't test Angular components):
Please provide the exception or error you saw
Other information
No response
I would be willing to submit a PR to fix this issue
- Yes
- No