-
Notifications
You must be signed in to change notification settings - Fork 6
/
jest.config.js
36 lines (36 loc) · 1.11 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
module.exports = {
roots: ['<rootDir>/src'],
collectCoverageFrom: [
'<rootDir>/src/**/*.ts',
'**/tests/**',
'<rootDir>/src/**/*.spec.ts',
'<rootDir>/src/**/*.test.ts',
'!<rootDir>/src/**/*index.ts',
'!<rootDir>/src/**/*app.module.ts',
'!<rootDir>/src/**/*main.ts',
'!<rootDir>/src/**/*Result.ts',
'!<rootDir>/src/**/*interface.ts',
'!<rootDir>/src/**/*env.ts',
'!<rootDir>/src/Shared/*',
'!<rootDir>/src/Shared/events/*',
],
coverageDirectory: 'coverage',
coveragePathIgnorePatterns: ['\\\\node_modules\\\\'],
coverageProvider: 'v8',
testEnvironment: 'node',
testPathIgnorePatterns: ['\\\\node_modules\\\\'],
transform: {
'^.+\\.ts$': 'ts-jest',
},
testRegex: '.*\\.spec\\.ts$',
moduleFileExtensions: ['js', 'json', 'ts'],
moduleNameMapper: {
'@/(.*)': '<rootDir>/src/$1',
'@root/(.*)': '<rootDir>/src/$1',
'@domain/(.*)': '<rootDir>/src/Domain/$1',
'@shared/(.*)': '<rootDir>/src/Shared/core/$1',
'@infra/(.*)': '<rootDir>/src/Infra/$1',
'@app/(.*)': '<rootDir>/src/Application/$1',
'@repo/(.*)': '<rootDir>/src/Repo/$1',
},
};