import { defineConfig } from 'vitest/config'; import path from 'path'; export default defineConfig({ resolve: { alias: { '@': path.resolve(__dirname, '.'), }, }, test: { globals: true, environment: 'node', include: ['tests/**/*.test.ts'], exclude: ['tests/e2e/**/*'], coverage: { provider: 'v8', reporter: ['text', 'json', 'html'], exclude: [ 'node_modules/', 'tests/', '**/*.d.ts', '**/*.config.*', '**/dist/**', ], }, // Longer timeout for integration tests testTimeout: 30000, }, }); // Separate E2E config - used when running test:e2e script export const e2eConfig = defineConfig({ test: { globals: true, environment: 'node', include: ['tests/e2e/**/*.e2e.test.ts'], // E2E tests need longer timeouts due to browser operations testTimeout: 120000, hookTimeout: 60000, }, });