-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.cjs
More file actions
31 lines (31 loc) · 934 Bytes
/
jest.config.cjs
File metadata and controls
31 lines (31 loc) · 934 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
module.exports = {
preset: 'ts-jest',
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node'],
testEnvironment: 'node',
testTimeout: 30000, // Increased timeout for async Pact tests
verbose: true,
collectCoverage: true,
coverageDirectory: './docs/coverage', // Adjust path
collectCoverageFrom: ['src/**/*.ts'], // Specify files for coverage
transform: {
'^.+\\.ts?$': 'ts-jest', // Use transform for ts-jest instead of globals
},
rootDir: './', // Adjust based on your project structure
testMatch: ['**/*.test.ts'], // Matches all .test.ts files
coverageThreshold: {
global: {
branches: 0,
functions: 0,
lines: 0,
statements: 0,
},
},
moduleNameMapper: {
'^@models/(.*)$': '<rootDir>/src/infrastructure/persistence/models/$1',
},
globals: {
'ts-jest': {
tsconfig: 'tsconfig.json', // tsconfig.json at the root of your project
},
},
};