-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.integration.config.js
More file actions
51 lines (41 loc) · 1.05 KB
/
jest.integration.config.js
File metadata and controls
51 lines (41 loc) · 1.05 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
40
41
42
43
44
45
46
47
48
49
50
51
/** @type {import('jest').Config} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
// Root directory
rootDir: '.',
// Test match patterns for integration tests only
testMatch: ['<rootDir>/tests/integration/**/*.test.ts'],
// Setup files
setupFiles: ['<rootDir>/tests/setup/env.setup.js'],
setupFilesAfterEnv: [
'<rootDir>/tests/setup/integration.setup.ts',
'<rootDir>/tests/setup/refresh.setup.ts',
],
// Coverage configuration (disabled for integration tests)
collectCoverage: false,
// Module resolution
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^@tests/(.*)$': '<rootDir>/tests/$1',
},
// Transform configuration
transform: {
'^.+\\.ts$': [
'ts-jest',
{
tsconfig: 'tsconfig.json',
},
],
},
// Test timeout (longer for integration tests)
testTimeout: 60000,
// Verbose output
verbose: true,
// Clear mocks between tests
clearMocks: true,
restoreMocks: true,
// Handle async operations
detectOpenHandles: true,
forceExit: true,
};