Merge pull request #26 from offendingcommit/chore/vitest-coverage
test(web): add v8 coverage with truthful baseline floor
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
"lint": "biome check src/",
|
||||
"lint:fix": "biome check --write src/",
|
||||
"test": "vitest run --passWithNoTests",
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"test:e2e": "playwright test",
|
||||
"generate:api": "openapi-typescript openapi.json -o src/api/schema.d.ts"
|
||||
},
|
||||
@@ -54,6 +55,7 @@
|
||||
"@types/react": "catalog:",
|
||||
"@types/react-dom": "catalog:",
|
||||
"@vitejs/plugin-react": "catalog:",
|
||||
"@vitest/coverage-v8": "catalog:",
|
||||
"jsdom": "catalog:",
|
||||
"openapi-typescript": "^7.8.0",
|
||||
"typescript": "catalog:",
|
||||
|
||||
@@ -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