-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
29 lines (27 loc) · 879 Bytes
/
jest.config.ts
File metadata and controls
29 lines (27 loc) · 879 Bytes
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
import type { JestConfigWithTsJest } from 'ts-jest'
const config: JestConfigWithTsJest = {
roots: ['<rootDir>', '<rootDir>/src'],
moduleDirectories: ['node_modules'],
moduleNameMapper: {
'^@data/(.*)$': '<rootDir>/src/data/$1',
'^@domain/(.*)$': '<rootDir>/src/domain/$1',
'^@infra/(.*)$': '<rootDir>/src/infra/$1',
'^@main/(.*)$': '<rootDir>/src/main/$1',
'^@presentation/(.*)$': '<rootDir>/src/presentation/$1',
'^@validation/(.*)$': '<rootDir>/src/validation/$1',
},
collectCoverageFrom: [
'<rootDir>/src/**/*.ts',
'!<rootDir>/src/main/**',
'!<rootDir>/src/**/*-protocols*',
'!**/protocols/**',
],
coverageDirectory: 'coverage',
testEnvironment: 'node',
preset: '@shelf/jest-mongodb',
transform: {
'.+\\.ts$': 'ts-jest',
},
watchPathIgnorePatterns: ['<rootDir>/globalConfig.json'],
}
export default config