import { defineConfig } from 'vitest/config' import react from '@vitejs/plugin-react' import { resolve } from 'path' export default defineConfig({ plugins: [react()], test: { environment: 'jsdom', globals: true, setupFiles: ['./src/test/setup.ts'], // Unit/integration tests live next to their source file under src/. // tests/ belongs to Playwright — Vitest must not pick those up. include: ['src/**/*.{test,spec}.{ts,tsx}'], exclude: ['node_modules/**', 'tests/**', '.next/**'], }, resolve: { alias: { '@': resolve(__dirname, './src'), }, }, })