import { defineConfig } from 'vitest/config'; export default defineConfig({ test: { include: ['{apps,packages}/*/src/**/*.test.ts'], environment: 'node', /** * Against SQLite in memory a harness is built in milliseconds. Against a real Postgres * it creates a database, runs both migrators and seeds forty documents, which is * seconds of honest work rather than a hang. */ testTimeout: process.env['TEST_DATABASE_URL'] ? 60_000 : 5_000, hookTimeout: process.env['TEST_DATABASE_URL'] ? 60_000 : 10_000, coverage: { provider: 'v8', include: ['packages/rules/src/**'], reporter: ['text', 'html', 'json-summary'], // RULES.md section 10: the tax logic carries the whole product's correctness, so // the bar is enforced rather than observed. Genuinely unreachable guards carry an // explicit `v8 ignore` and a comment saying why. thresholds: { statements: 100, branches: 100, functions: 100, lines: 100 }, }, }, });