import { defineConfig } from 'vitest/config' import path from 'path' export default defineConfig({ test: { environment: 'happy-dom', globals: true, setupFiles: [path.resolve(__dirname, 'setup.ts')], include: [ '../test/unit/**/*.{test,spec}.{ts,tsx}', '../test/integration/**/*.{test,spec}.{ts,tsx}', '../test/components/**/*.{test,spec}.{ts,tsx}', ], exclude: ['**/node_modules/**'], coverage: { provider: 'v8', reporter: ['text', 'html', 'lcov'], include: ['src/**/*.ts', 'src/**/*.tsx'], exclude: [ 'src/app/layout.tsx', 'src/lib/prisma.ts', 'src/**/*.d.ts', ], thresholds: { lines: 70, functions: 70 }, }, }, resolve: { alias: { '@': path.resolve(__dirname, '../app/src'), }, }, esbuild: { jsx: 'automatic', jsxImportSource: 'react', }, })