-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.cjs
More file actions
40 lines (40 loc) · 1.04 KB
/
jest.config.cjs
File metadata and controls
40 lines (40 loc) · 1.04 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
/**
* Jest configuration for Log Engine - Local Development
* Simple configuration for local testing and development
*/
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/__tests__/**/*.test.ts'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
transform: {
'^.+\\.(ts|tsx)$': 'ts-jest',
},
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testPathIgnorePatterns: ['/node_modules/', '/dist/'],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/*.d.ts',
'!src/**/*.test.ts',
'!src/**/__tests__/**',
],
// Coverage output
coverageReporters: ['text', 'lcov', 'html'],
coverageDirectory: 'coverage',
// Coverage thresholds for CI/CD pipeline
coverageThreshold: {
global: {
statements: 80,
branches: 80,
functions: 80,
lines: 80
}
},
// Use available CPU cores for better local performance
maxWorkers: '50%',
// Reasonable timeout for local development
testTimeout: 15000,
// Clean up between tests
clearMocks: true,
restoreMocks: true
};