/** * Jest configuration for E2E tests * Separate from unit tests to allow different settings */ export default { displayName: 'E2E Tests', testMatch: ['/tests/e2e/**/*.test.js'], testPathIgnorePatterns: [ '/node_modules/', '/tests/e2e/utils/', '/tests/e2e/config/', '/tests/e2e/runners/', '/tests/e2e/e2e_helpers.sh', '/tests/e2e/test_llm_analysis.sh', '/tests/e2e/run_e2e.sh', '/tests/e2e/run_fallback_verification.sh' ], testEnvironment: 'node', testTimeout: 600000, // 10 minutes default (AI operations can be slow) maxWorkers: 6, // Run tests in 6 parallel workers to avoid rate limits maxConcurrency: 6, // Limit concurrent test execution testSequencer: '/tests/e2e/setup/rate-limit-sequencer.cjs', // Custom sequencer for rate limiting verbose: true, // Suppress console output for cleaner test results silent: false, setupFilesAfterEnv: ['/tests/e2e/setup/jest-setup.js'], globalSetup: '/tests/e2e/setup/global-setup.js', globalTeardown: '/tests/e2e/setup/global-teardown.js', collectCoverageFrom: [ 'src/**/*.js', '!src/**/*.test.js', '!src/**/__tests__/**' ], coverageDirectory: '/coverage-e2e', // Custom reporters for better E2E test output // Transform configuration to match unit tests transform: {}, transformIgnorePatterns: ['/node_modules/'], // Module configuration moduleNameMapper: { '^@/(.*)$': '/$1' }, moduleDirectories: ['node_modules', ''], // Reporters configuration reporters: [ 'default', 'jest-junit', [ 'jest-html-reporters', { publicPath: './test-results', filename: 'index.html', pageTitle: 'Task Master E2E Test Report', expand: true, openReport: false, hideIcon: false, includeFailureMsg: true, enableMergeData: true, dataMergeLevel: 1, inlineSource: false, customInfos: [ { title: 'Environment', value: 'E2E Testing' }, { title: 'Test Type', value: 'CLI Commands' } ] } ] ], // Environment variables for E2E tests testEnvironmentOptions: { env: { NODE_ENV: 'test', E2E_TEST: 'true' } } };