import tsconfigPaths from 'vite-tsconfig-paths' import { defineConfig } from 'vitest/config' export default defineConfig({ plugins: [tsconfigPaths({ projects: ['./tsconfig.test.json'] })], test: { include: ['packages/*/tests/**/*.spec.ts'], coverage: { provider: 'v8', // Coverage measures OUR runtime source. Types-only files carry no // executable code; vendor/ and examples/ are out of scope (examples are // exercised by the demo smoke test instead). include: ['packages/*/src/**/*.ts'], exclude: ['packages/*/src/types.ts'], // 100% or it doesn't merge (AGENTS.md: excessive tests are welcome). // Per-file so a well-covered big file can't subsidize a bare one. // Every v8 ignore comment must carry a reason — see AGENTS.md. thresholds: { perFile: true, statements: 100, branches: 100, functions: 100, lines: 100, }, reporter: ['text', 'html'], }, }, })