generated from nhcarrigan/template
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:
@@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user