-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
35 lines (35 loc) · 1 KB
/
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
30
31
32
33
34
35
module.exports = {
transform: {
'^.+\\.ts?$': 'ts-jest'
},
testEnvironment: 'node',
testRegex: './__tests__/.*\\.(test|spec)?\\.(ts|ts)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
rootDir: '.',
roots: ['<rootDir>/src', '<rootDir>/__tests__'],
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: [
'.js',
'./node_modules/',
'./src/services/logger.service.ts',
'./src/repositories/user.repository.ts'
],
coverageThreshold: {
global: {
branches: 75,
functions: 75,
lines: 75,
statements: 75
}
},
moduleNameMapper: {
'@/endpoints/(.*)': '<rootDir>/src/endpoints/$1',
'@/models/(.*)': '<rootDir>/src/models/$1',
'@/middlewares/(.*)': '<rootDir>/src/middlewares/$1',
'@/repositories/(.*)': '<rootDir>/src/repositories/$1',
'@/routes/(.*)': '<rootDir>/src/routes/$1',
'@/services/(.*)': '<rootDir>/src/services/$1',
'@/utils/(.*)': '<rootDir>/src/utils/$1',
'@/(.*)': '<rootDir>/src/$1'
}
};