test(web): add v8 coverage with truthful baseline floor
Adds @vitest/coverage-v8 (catalog-pinned), a test:coverage script wired through turbo (inputs + coverage/** output), and coverage thresholds set to a floor measured on main (lines 18 / funcs 10 / branches 10 / stmts 17 against current 19.3/11.4/11.7/18.9). Ratchet upward as tests grow. Adapts the coverage config from @BenSheridanEdwards's fork; the multi-job CI fan-out from that branch was intentionally left out. Co-authored-by: Ben Sheridan-Edwards <BenSheridanEdwards@users.noreply.github.com>
This commit is contained in:
@@ -22,5 +22,26 @@ export default defineConfig({
|
||||
css: false,
|
||||
include: ["src/**/*.{test,spec}.{ts,tsx}"],
|
||||
exclude: ["node_modules", "dist", "e2e"],
|
||||
coverage: {
|
||||
provider: "v8",
|
||||
reporter: ["text", "html", "json-summary", "lcov"],
|
||||
include: ["src/**/*.{ts,tsx}"],
|
||||
exclude: [
|
||||
"src/**/*.{test,spec}.{ts,tsx}",
|
||||
"src/test/**",
|
||||
"src/routeTree.gen.ts",
|
||||
"src/api/schema.d.ts",
|
||||
"src/main.tsx",
|
||||
"src/vite-env.d.ts",
|
||||
],
|
||||
// Truthful baseline floor measured on main (not copied from the
|
||||
// fork). Ratchet upward as feature tests grow.
|
||||
thresholds: {
|
||||
lines: 18,
|
||||
functions: 10,
|
||||
branches: 10,
|
||||
statements: 17,
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user