import { defineConfig } from 'vitest/config';

/**
 * E2E Test Configuration
 * 
 * IMPORTANT: E2E tests run in HEADLESS mode only.
 * This configuration is specifically for browser-based E2E tests.
 */
export default 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,
    // Run tests sequentially to avoid port conflicts
    pool: 'forks',
    poolOptions: {
      forks: {
        singleFork: true,
      },
    },
  },
});