Files
gridpilot.gg/vitest.e2e.config.ts
2025-12-01 00:48:34 +01:00

39 lines
1.2 KiB
TypeScript

import { defineConfig } from 'vitest/config';
/**
* E2E Test Configuration
*
* IMPORTANT: E2E tests run against real OS automation.
* This configuration includes strict timeouts to prevent hanging.
*/
const RUN_REAL_AUTOMATION_SMOKE = process.env.RUN_REAL_AUTOMATION_SMOKE === '1';
export default defineConfig({
test: {
globals: true,
environment: 'node',
include: ['tests/e2e/**/*.e2e.test.ts'],
exclude: RUN_REAL_AUTOMATION_SMOKE
? ['tests/e2e/companion/companion-ui-full-workflow.e2e.test.ts']
: [
'tests/e2e/automation.e2e.test.ts',
'tests/e2e/companion/companion-ui-full-workflow.e2e.test.ts',
],
// E2E tests use real automation - set strict timeouts to prevent hanging
// Individual tests: 30 seconds max
testTimeout: 30000,
// Hooks (beforeAll, afterAll, etc.): 30 seconds max
hookTimeout: 30000,
// Overall suite timeout: 2 minutes max to catch any hanging tests
teardownTimeout: 5000,
// Run tests sequentially to avoid port conflicts
pool: 'forks',
poolOptions: {
forks: {
singleFork: true,
},
},
// Force exit after tests complete to prevent hanging from async operations
forceRerunTriggers: [],
},
});