-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
33 lines (32 loc) · 988 Bytes
/
jest.config.ts
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
export const config = {
clearMocks: true,
moduleFileExtensions: ['ts', 'js'],
verbose: true,
preset: 'ts-jest',
moduleNameMapper: {
'@main': ['<rootDir>/src/index.ts'],
'@di/(.*)$': ['<rootDir>/src/di/$1'],
'@modules/(.*)$': ['<rootDir>/src/modules/$1'],
'@shared/(.*)$': ['<rootDir>/src/shared/$1'],
},
modulePathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/lib/', '<rootDir>/coverage/'],
roots: ['<rootDir>/src'],
setupFilesAfterEnv: ['./jest.setup.ts'],
testEnvironment: 'node',
testMatch: ['**/__tests__/**/*.ts', '**/?(*.)+(spec|test).ts'],
testPathIgnorePatterns: ['\\\\node_modules\\\\', '\\\\lib\\\\'],
transform: {
'^.+\\.(ts)$': [
'ts-jest',
{
tsconfig: './tsconfig.json',
isolatedModules: true,
},
],
},
transformIgnorePatterns: ['\\\\node_modules\\\\'],
collectCoverage: true,
coverageDirectory: 'coverage',
coverageReporters: ['text', 'lcov'],
};
export default config;