-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathjest.integration.config.js
More file actions
39 lines (34 loc) · 1.19 KB
/
Copy pathjest.integration.config.js
File metadata and controls
39 lines (34 loc) · 1.19 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
module.exports = {
preset: 'ts-jest/presets/default-esm',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
testMatch: ['**/tests/integration/**/*.test.ts', '**/tests/integration/**/*.spec.ts'],
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/tests/unit/', '/tests/fixtures/'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^@tests/(.*)$': '<rootDir>/tests/$1',
},
// Transform ES modules from node_modules that Jest can't handle
transformIgnorePatterns: [
'node_modules/(?!(@agentclientprotocol|zod|uuid)/)',
],
setupFiles: ['<rootDir>/tests/integration/env.ts'],
setupFilesAfterEnv: ['<rootDir>/tests/integration/setup.ts'],
globalTeardown: '<rootDir>/tests/integration/teardown.ts',
// testSequencer: '<rootDir>/tests/integration/sequencer.js', // Disabled - not needed with maxWorkers: 1
transform: {
'^.+\\.tsx?$': ['ts-jest', {
tsconfig: 'tsconfig.json',
useESM: true,
}],
'^.+\\.m?js$': ['ts-jest', { tsconfig: { module: 'commonjs' } }],
},
testTimeout: 10000,
maxWorkers: 1,
clearMocks: true,
restoreMocks: true,
errorOnDeprecated: true,
detectOpenHandles: true,
forceExit: true,
verbose: true,
};