-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjest.config.js
More file actions
47 lines (47 loc) · 1.11 KB
/
jest.config.js
File metadata and controls
47 lines (47 loc) · 1.11 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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src', '<rootDir>/tests'],
testMatch: [
'**/__tests__/**/*.ts',
'**/?(*.)+(spec|test|benchmark).ts'
],
// Ignore test fixtures to prevent haste module collisions
modulePathIgnorePatterns: [
'<rootDir>/tests/fixtures/.temp',
'<rootDir>/tests/fixtures/ContractMaster-Test-Original'
],
transform: {
'^.+\\.ts$': 'ts-jest'
},
coverageDirectory: 'coverage',
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/**/*.test.ts',
'!src/**/*.spec.ts'
],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80
}
},
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts'],
// Configuration to fix IDE Jest worker issues
maxWorkers: 1,
workerIdleMemoryLimit: '512MB',
testTimeout: 30000,
forceExit: true,
detectOpenHandles: true,
// Set NODE_ENV for tests
testEnvironmentOptions: {
NODE_ENV: 'test'
},
// Fix for Jest 30.x compatibility
transformIgnorePatterns: [
'node_modules/(?!(chalk|ora)/)'
]
};