import { defineConfig } from 'vitest/config';
import * as path from 'path';

export default defineConfig({
  test: {
    globals: true,
    environment: 'node',
    include: [
      'tests/smoke/website-ssr.test.ts',
    ],
    exclude: [
      '**/companion/**',
      '**/*companion*.test.ts',
      'tests/smoke/electron-init.smoke.test.ts',
      'tests/smoke/browser-mode-toggle.smoke.test.ts',
      'tests/smoke/di-container.test.ts',
      'tests/smoke/electron-build.smoke.test.ts',
    ],
    testTimeout: 30000,
    hookTimeout: 60000,
    teardownTimeout: 30000,
    isolate: true,
    pool: 'forks',
    env: {
      GRIDPILOT_API_PERSISTENCE: 'inmemory',
    },
  },
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './apps/website'),
      '@core': path.resolve(__dirname, './core'),
    },
  },
});