-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathjest.config.js
More file actions
39 lines (39 loc) · 1.01 KB
/
Copy pathjest.config.js
File metadata and controls
39 lines (39 loc) · 1.01 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
export default {
preset: 'ts-jest/presets/default-esm',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
transformIgnorePatterns: ['node_modules/(?!(validator|ms)/)'],
// Set NODE_ENV to test
setupFiles: ['<rootDir>/jest.setup.js'],
// Run tests sequentially to avoid race conditions with build artifacts
maxWorkers: 1,
// Increase test timeout for build-dependent tests
testTimeout: 10000,
// Coverage configuration
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/**/*.d.ts',
'!src/**/*.test.ts',
'!src/**/*.spec.ts',
],
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: [
'/node_modules/',
'/dist/',
'/coverage/',
'/test/',
],
coverageThreshold: {
global: {
branches: 90,
functions: 90,
lines: 90,
statements: 90,
},
},
// Exclude integration tests from Jest test runs
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/test/integration/'],
};