Open kevinkasper opened 1 month ago
Clone minimal reproducible example:
https://github.com/kevinkasper/analogjs-vite-plugin-angular-coverage-mre
yarn install
yarn vitest --coverage --run
vite-plugin-angular
If the minimal reproducible example is executed, a code coverage of 100% is displayed, although no test covers the code.
Many thanks in advance!
❯ yarn vitest --coverage --run yarn run v1.22.22 $ /Users/FooBar/analogjs-vite-plugin-angular-coverage-mre/node_modules/.bin/vitest --coverage --run RUN v2.0.3 /Users/FooBar/analogjs-vite-plugin-angular-coverage-mre Coverage enabled with v8 ✓ src/app/app.component.spec.ts (1) ✓ AppComponent (1) ✓ test Test Files 1 passed (1) Tests 1 passed (1) Start at 22:48:35 Duration 793ms (transform 216ms, setup 161ms, collect 187ms, tests 34ms, environment 152ms, prepare 216ms) % Coverage report from v8 ------------------|---------|----------|---------|---------|------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ------------------|---------|----------|---------|---------|------------------- All files | 100 | 100 | 100 | 100 | app.component.ts | 100 | 100 | 100 | 100 | ------------------|---------|----------|---------|---------|------------------- ✨ Done in 2.42s.
No response
Same issue not only with v8 coverage provider but as well with istanbul coverage provider.
v8
istanbul
Please provide the environment you discovered this bug in.
Clone minimal reproducible example:
https://github.com/kevinkasper/analogjs-vite-plugin-angular-coverage-mre
yarn install
yarn vitest --coverage --run
Which area/package is the issue in?
vite-plugin-angular
Description
If the minimal reproducible example is executed, a code coverage of 100% is displayed, although no test covers the code.
Many thanks in advance!
Please provide the exception or error you saw
Other information
No response
I would be willing to submit a PR to fix this issue