ci: add coverage tooling for frontend and backend

- Add @vitest/coverage-v8 for frontend test coverage
- Configure vitest with coverage thresholds (15% statements/lines, 13% branches/functions)
- Add npm scripts for backend testing and coverage with cargo-llvm-cov
- Add test:all and coverage:all scripts for unified test execution
- Exclude coverage directory from git tracking
This commit is contained in:
2026-01-25 22:48:01 -08:00
parent cd15247dea
commit 78b951a865
4 changed files with 158 additions and 0 deletions
+18
View File
@@ -8,5 +8,23 @@ export default defineConfig({
environment: "jsdom",
setupFiles: ["./vitest.setup.ts"],
globals: true,
coverage: {
provider: "v8",
reporter: ["text", "json", "html"],
reportsDirectory: "./coverage",
include: ["src/lib/**/*.ts"],
exclude: [
"src/lib/**/*.test.ts",
"src/lib/**/*.spec.ts",
"src/lib/**/*.d.ts",
"src/lib/components/**",
],
thresholds: {
statements: 15,
branches: 13,
functions: 13,
lines: 15,
},
},
},
});