Files
F-r-ldraledigplannerare/frontend/vitest.config.ts
T
jacobh2 b03462066e Ratchet coverage floors up to match measured coverage
Frontend floors move to 96/96/91/92 (measured 97.27/97.27/92.87/93.78)
and the backend gate to 80 (measured 83.47). Kept 1-2pp below measured so
real regressions fail without false positives on incidental drift.

These are a ratchet: raised as coverage grows, never lowered to make a
gate pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RXMhc9nT6sNz1SL4j8dznL
2026-09-14 18:54:56 +02:00

39 lines
989 B
TypeScript

import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import { resolve } from 'path'
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./tests/setup.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'lcov'],
// Thresholds set as a regression ratchet to prevent coverage from dropping.
// Measured: lines 97.27%, functions 92.87%, statements 97.27%, branches 93.78%.
// Set ~1-2pp below measured to catch real regressions without false positives.
thresholds: {
lines: 96,
functions: 91,
branches: 92,
statements: 96,
},
include: ['src/**/*.{ts,tsx}'],
exclude: [
'src/main.tsx',
'src/vite-env.d.ts',
'src/types/**',
'**/*.test.ts',
'**/*.test.tsx',
],
},
},
})