import { join } from 'path'; import { afterEach, vi } from 'vitest'; import { CLIExecutor } from '../utils/cli-executor'; // Global test configuration - just the essentials const TEST_CONFIG = { CLI_PATH: join(__dirname, '../../../../bin/ocp.js'), FIXTURES_PATH: join(__dirname, '../fixtures'), BASELINES_PATH: join(__dirname, '../fixtures/baselines'), DEFAULT_TIMEOUT: 20000, LONG_TIMEOUT: 30000 }; // Make test config globally available (global as any).TEST_CONFIG = TEST_CONFIG; beforeAll(() => { new CLIExecutor().execute(['env', 'set', 'staging']); }) afterEach(() => { // Cleanup after each test vi.clearAllMocks(); }); // Global error handler for unhandled rejections process.on('unhandledRejection', (reason, promise) => { console.error('Unhandled Rejection at:', promise, 'reason:', reason); });