-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
50 lines (50 loc) · 1.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
module.exports = {
testEnvironment: 'node',
moduleFileExtensions: ['js', 'json', 'ts'],
rootDir: './',
moduleDirectories: ['<rootDir>', 'node_modules'],
modulePaths: ['<rootDir>'],
testRegex: '.*\\.spec\\.ts$',
preset: 'ts-jest',
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
testPathIgnorePatterns: [
'/node_modules./',
'<rootDir>/(coverage|dist|lib|tmp)./',
],
coverageReporters: ['text', 'lcov', 'cobertura', 'json-summary'],
coveragePathIgnorePatterns: [
'node_modules',
'test-config',
'interfaces',
'jestGlobalMocks.ts',
'.exception.ts',
'.interceptor.ts',
'.entity.ts',
'.facade.usecase.ts',
'.model.ts',
'prisma',
'.module.ts',
'<rootDir>/src/app/main.ts',
'.mock.ts',
],
collectCoverageFrom: [
'src/**/*.ts',
'!src/**/index.ts',
'!*/node_modules/**',
'!<rootDir>/src/main.ts',
],
coverageThreshold: {
global: {
branches: 10,
functions: 10,
lines: 10,
statements: 10,
},
},
coverageDirectory: 'coverage',
};