import { defineConfig } from 'vitest/config';
import { resolve } from 'node:path';

export default defineConfig({
  test: {
    globals: true,
    watch: false,
    environment: 'jsdom',
    setupFiles: ['tests/setup/vitest.setup.ts'],
    include: [
      'apps/website/lib/types/**/*.test.ts',
      'apps/website/lib/gateways/**/*.test.ts',
      'apps/website/lib/blockers/**/*.test.ts',
      'apps/website/lib/auth/**/*.test.ts',
      'apps/website/lib/services/**/*.test.ts',
      'apps/website/lib/adapters/**/*.test.ts',
      'apps/website/tests/guardrails/**/*.test.ts',
      'apps/website/tests/services/**/*.test.ts',
      'apps/website/components/**/*.test.tsx',
      'apps/website/components/**/*.test.ts',
    ],
    exclude: ['node_modules/**', 'apps/website/.next/**', 'dist/**'],
  },
  resolve: {
    alias: {
      '@': resolve(__dirname, './apps/website'),
      '@core': resolve(__dirname, './core'),
    },
  },
});