Files
jacobh2 ae6db7e16f Redesign the setup flow and consolidate the CSS into one primitives layer
Onboarding asks explicitly for one or two parents and shows one card per
parent for balances; the balance form is per parent with inline
validation; the partner can be filled from the FK deduction or added
from it. Settings and Dashboard reuse the same form.

CSS: bare buttons carry no colour any more; buttons, cards, choice
cards, fields, alerts, badges, eyebrow and modal chrome are defined once
in primitives.css. Media queries live only in responsive.css. A style
guard test blocks hex, !important and stray media queries. Bilingual
fixes: calendar selects size by content, header no longer wraps. Vitest
is capped at four workers.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-19 12:27:29 +02:00

54 lines
1.6 KiB
TypeScript

import { configDefaults, 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'],
// Cap the worker pool: unbounded, Vitest forks one jsdom worker per CPU core
// (12 on the dev machine) and a coverage run has exhausted the machine's memory
// when two runs overlapped. Four workers keeps a run under ~3 GB with little
// wall-clock cost; CI runners have fewer cores anyway.
pool: 'forks',
poolOptions: {
forks: {
maxForks: 4,
minForks: 1,
},
},
// The Playwright E2E suite lives under e2e/ and uses @playwright/test's
// own test runner (`npm run e2e`), not Vitest's — exclude it here so
// `vitest run` never tries to collect those specs.
exclude: [...configDefaults.exclude, 'e2e/**'],
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',
],
},
},
})