forked from tduyng/nestjs-graphql-prisma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
39 lines (38 loc) · 930 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
30
31
32
33
34
35
36
37
38
39
module.exports = {
preset: 'ts-jest',
moduleFileExtensions: ['js', 'json', 'ts'],
rootDir: 'src',
testRegex: '.*\\.spec\\.ts$',
transform: {
'^.+\\.(t|j)s$': 'ts-jest',
},
testEnvironment: 'node',
moduleDirectories: ['node_modules', 'src'],
moduleNameMapper: {
'^src/(.*)$': '<rootDir>/$1',
'^@common/(.*)$': '<rootDir>/common/$1',
'^@modules/(.*)$': '<rootDir>/modules/$1',
'^@app/(.*)$': '<rootDir>/app/$1',
'^@providers/(.*)$': '<rootDir>/providers/$1',
},
collectCoverageFrom: ['<rootDir>/modules/**/*.ts'],
coverageDirectory: '../coverage',
coveragePathIgnorePatterns: [
'/node_modules/',
'common',
'<rootDir>/main.ts',
'index.ts',
'jestGlobalMocks.ts',
'.interface.ts',
'.module.ts',
'.mock.ts',
'.model.ts',
'.entity.ts',
'.dto.ts',
'.input.ts',
'.spec.ts',
'.test.ts',
'.decorator.ts',
'.types.ts',
],
};