feat(test): WP-46 — Vitest coverage (report-only)

Enable coverage via the @angular/build:unit-test builder's first-class options: a
`coverage` configuration on the test target (v8 provider, text-summary/html/lcov,
excludes for specs/stories/contracts/generated client) + `npm run test:coverage`.
Report-only (no thresholds) — visibility first. CI's test step now runs test:coverage
(strict superset: fails on a failing test, never on coverage). Baseline ~71% stmts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
eho
2026-07-23 14:23:55 +02:00
co-authored by Claude Opus 4.8
parent 7d2a36ff22
commit f8cd77a48a
7 changed files with 157 additions and 8 deletions
+16 -1
View File
@@ -91,7 +91,22 @@
"defaultConfiguration": "development"
},
"test": {
"builder": "@angular/build:unit-test"
"builder": "@angular/build:unit-test",
"configurations": {
"coverage": {
"coverage": true,
"coverageReporters": ["text-summary", "html", "lcov"],
"coverageExclude": [
"**/*.spec.ts",
"**/*.stories.ts",
"**/contracts/**",
"src/app/shared/infrastructure/api-client.ts",
"src/main.ts",
"src/test-setup.ts",
"**/*.d.ts"
]
}
}
},
"storybook": {
"builder": "@storybook/angular:start-storybook",