-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
40 lines (31 loc) · 1.22 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
/* eslint-disable */
module.exports = {
// Automatically clear mock calls and instances between every test
clearMocks: true,
coverageDirectory: 'coverage',
// An array of regexp pattern strings used to skip coverage collection
coveragePathIgnorePatterns: ['<rootDir>/node_modules/(?!@foo)'],
preset: 'ts-jest',
testEnvironment: 'node',
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$',
globals: {
'ts-jest': {
tsConfig: 'tsconfig.json'
}
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'@/src/(.*)': '<rootDir>/src/$1',
'@/api/http/(.*)': '<rootDir>/src/api/http/$1',
'@/api/(.*)': '<rootDir>/src/api/$1',
'@/api': '<rootDir>/src/api',
'@/app/(.*)': '<rootDir>/src/app/$1',
'@/domain/(.*)': '<rootDir>/src/domain/$1',
'@/domain': '<rootDir>/src/domain',
'@/services/(.*)': '<rootDir>/src/app/services/$1',
'@/services': '<rootDir>/src/app/services',
'@/libs/(.*)': '<rootDir>/src/libs/$1',
'@/infra/(.*)': '<rootDir>/src/infra/$1',
'@/infra/repositories/(.*)': '<rootDir>/src/infra/database/repositories/$1'
}
};