-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
33 lines (31 loc) · 863 Bytes
/
jest.config.ts
File metadata and controls
33 lines (31 loc) · 863 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
import type { Config } from 'jest';
const config: Config = {
testEnvironment: 'node',
clearMocks: true,
testMatch: [
'<rootDir>/test/**/*.spec.ts',
'<rootDir>/test/**/*.test.ts',
'<rootDir>/src/**/*.spec.ts',
],
transform: {
'^.+\\.ts$': ['ts-jest', { tsconfig: 'tsconfig.json' }],
},
moduleNameMapper: {
'^@common/(.*)$': '<rootDir>/src/common/$1',
'^@config/(.*)$': '<rootDir>/src/config/$1',
'^@core/(.*)$': '<rootDir>/src/core/$1',
'^@adapters/(.*)$': '<rootDir>/src/adapters/$1',
'^@controllers/(.*)$': '<rootDir>/src/controllers/$1',
},
collectCoverageFrom: ['src/**/*.ts', '!src/**/*.d.ts', '!src/**/index.ts'],
coverageDirectory: 'coverage',
coverageThreshold: {
global: {
branches: 65,
functions: 60,
lines: 60,
statements: 60,
},
},
};
export default config;