feat(KB-044): add test coverage reporting with vitest coverage-v8

- Add @vitest/coverage-v8 to all workspace packages
- Configure vitest coverage settings in all vitest.config.ts files
- Align vitest versions across packages for consistency
- Add 'test:coverage' script to root package.json
- Verify all tests pass with coverage reporting enabled
This commit is contained in:
gsxdsm
2026-03-29 19:42:27 -07:00
parent 34be4bf479
commit dd671f080c
11 changed files with 409 additions and 211 deletions

View File

@@ -42,10 +42,11 @@
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"@vitejs/plugin-react": "^4.3.0",
"@vitest/coverage-v8": "^3.1.0",
"jsdom": "^29.0.1",
"typescript": "^5.7.0",
"vite": "^6.0.0",
"vitest": "^4.1.1"
"vitest": "^3.1.0"
},
"private": true
}

View File

@@ -14,5 +14,12 @@ export default defineConfig({
globals: true,
include: ["app/**/*.test.{ts,tsx}", "src/**/*.test.{ts,tsx}"],
setupFiles: ["./vitest.setup.ts"],
coverage: {
enabled: false,
reporter: ["text", "html", "json"],
reportsDirectory: "./coverage",
include: ["app/**/*.{ts,tsx}", "src/**/*.{ts,tsx}"],
exclude: ["**/*.test.{ts,tsx}", "**/*.d.ts", "dist/**"],
},
},
});