import { fileURLToPath, URL } from 'node:url'; import { defineConfig } from 'vitest/config'; import react from '@vitejs/plugin-react'; export default defineConfig({ plugins: [react()], resolve: { alias: { '@': fileURLToPath(new URL('./src', import.meta.url)) } }, test: { environment: 'jsdom', globals: true, css: true, setupFiles: ['./src/test/setup.ts'], include: ['src/**/*.{test,spec}.{ts,tsx}', 'tests/**/*.{test,spec}.{ts,tsx}'], exclude: ['dist/**', 'node_modules/**', 'playwright-report/**', 'test-results/**'], coverage: { provider: 'v8', reporter: ['text', 'html', 'lcov'], reportsDirectory: './coverage', exclude: [ 'dist/**', 'coverage/**', 'node_modules/**', 'src/vite-env.d.ts', '**/*.config.{ts,js,cjs,mjs}', '**/*.d.ts' ], thresholds: { lines: 70, functions: 65, branches: 60, statements: 70 } } } });