-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathjest.config.js
More file actions
33 lines (33 loc) · 920 Bytes
/
jest.config.js
File metadata and controls
33 lines (33 loc) · 920 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
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
roots: ['<rootDir>/src'],
testMatch: ['**/__tests__/**/*.ts', '**/*.test.ts'],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/**/*.test.ts',
],
moduleFileExtensions: ['ts', 'js', 'json'],
transform: {
'^.+\\.ts$': 'ts-jest',
'^.+\\.js$': 'babel-jest',
},
transformIgnorePatterns: [
// Transform ESM-only packages (chalk, execa, commander, etc.)
'node_modules/(?!(chalk|execa|commander)/)',
],
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov', 'html', 'json-summary'],
coverageThreshold: {
global: {
branches: 30,
functions: 35,
lines: 38,
statements: 38,
},
},
// Parallel test execution - use 50% of available CPUs to balance speed and resource usage
// Unit tests are isolated and safe to run in parallel
maxWorkers: '50%',
};