-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
29 lines (29 loc) · 939 Bytes
/
jest.config.js
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
module.exports = {
moduleFileExtensions: ['js', 'json', 'ts'],
roots: ['<rootDir>/src'],
testRegex: ['.spec.ts$'],
collectCoverageFrom: ['<rootDir>/src/**/*.(t|j)s'],
setupFiles: ['<rootDir>/test/jest.env.js'],
coverageDirectory: './coverage',
coverageReporters: ['html', ['text', { skipFull: true }]],
coverageThreshold: {
global: {
statements: 50,
branches: 40,
functions: 35,
lines: 50,
},
},
testEnvironment: 'node',
moduleNameMapper: {
'^@api(.*)$': '<rootDir>/src/api/$1',
'^@common(.*)$': '<rootDir>/src/common/$1',
'^@core(.*)$': '<rootDir>/src/core/$1',
'^@domain(.*)$': '<rootDir>/src/domain/$1',
'^@infrastructure(.*)$': '<rootDir>/src/infrastructure/$1',
'^@modules(.*)$': '<rootDir>/src/modules/$1',
},
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
};