-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.e2e.config.js
More file actions
39 lines (39 loc) · 1.06 KB
/
Copy pathjest.e2e.config.js
File metadata and controls
39 lines (39 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/** @type {import('jest').Config} */
module.exports = {
displayName: 'E2E Tests',
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/tests/e2e'],
testMatch: ['**/*.e2e.test.ts'],
transform: {
'^.+\\.tsx?$': ['ts-jest', {
useESM: false,
isolatedModules: true,
tsconfig: {
target: 'ES2020',
module: 'commonjs',
moduleResolution: 'node',
allowSyntheticDefaultImports: true,
esModuleInterop: true,
skipLibCheck: true
}
}],
},
testTimeout: 60000,
maxWorkers: 1, // Run E2E tests sequentially to avoid conflicts
setupFilesAfterEnv: ['<rootDir>/tests/e2e/setup.ts'],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/**/*.test.ts',
'!src/**/__tests__/**',
'!src/types/**',
'!src/stubs/**'
],
coverageDirectory: 'coverage/e2e',
coverageReporters: ['text', 'lcov', 'html'],
verbose: true,
bail: 1, // Stop on first test failure
forceExit: true, // Ensure Jest exits cleanly
detectOpenHandles: true, // Help debug hanging processes
};