import react from "@vitejs/plugin-react"; import { defineConfig } from "vitest/config"; // Inline config — testing-dom defines createTestConfig but cannot // self-reference it. Polyfills file is internal to this package's own // test run; the production polyfills export is from /dist/setup/polyfills. export default defineConfig({ plugins: [react()], test: { globals: false, environment: "happy-dom", pool: "forks", fileParallelism: false, setupFiles: [ "./tests/setup/polyfills.ts", "./src/matchers/matchers.ts", ], include: [ "src/**/*.test.ts", "src/**/*.test.tsx", "tests/**/*.test.ts", "tests/**/*.test.tsx", ], exclude: [ "src/__benchmarks__/**", "benchmarks/**", "e2e/**", "dist/**", "node_modules/**", ], coverage: { provider: "istanbul", reporter: ["text", "html", "lcov"], include: ["src/**/*.ts", "src/**/*.tsx"], exclude: [ "src/**/*.test.ts", "src/**/*.test.tsx", "src/**/*.bench.ts", "src/**/*.schemas.ts", "src/**/*.types.ts", "src/**/index.ts", "src/__benchmarks__/**", "src/runner/bun-test.ts", "src/runner/vitest.ts", "src/runner/mocks.ts", "src/setup/polyfills.ts", "tests/**", ], thresholds: { statements: 100, branches: 100, functions: 100, lines: 100, }, }, testTimeout: 5000, }, });