-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
49 lines (44 loc) · 1017 Bytes
/
jest.config.js
File metadata and controls
49 lines (44 loc) · 1017 Bytes
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
module.exports = {
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/src/setupTests.ts'],
// Coverage thresholds
collectCoverageFrom: [
'src/utils/financialCalculations.ts',
'src/utils/security.ts',
'src/utils/validations.ts',
'src/hooks/**/*.ts',
'src/App.tsx'
],
coverageThreshold: {
global: {
branches: 80,
functions: 90,
lines: 85,
statements: 85
},
// Critical files need higher coverage
'src/utils/financialCalculations.ts': {
functions: 95,
lines: 90
},
'src/utils/security.ts': {
functions: 100,
lines: 95
}
},
// Test timeout for performance tests
testTimeout: 10000,
// Module name mapping
moduleNameMapping: {
'^@/(.*)$': '<rootDir>/src/$1'
},
// Transform configuration
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest'
},
// Test file patterns
testMatch: [
'<rootDir>/src/**/__tests__/**/*.(ts|tsx)',
'<rootDir>/src/**/*.(test|spec).(ts|tsx)'
]
};