-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.ts
35 lines (33 loc) · 1.1 KB
/
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
34
35
import type { Config } from '@jest/types';
const config: Config.InitialOptions = {
preset: 'ts-jest',
testEnvironment: 'node',
verbose: true,
coverageDirectory: 'coverage',
collectCoverage: true,
testPathIgnorePatterns: ['/node_modules/'],
transform: {
'^.+\\.ts?$': 'ts-jest'
},
testMatch: ['<rootDir>/src/**/test/*.ts'],
collectCoverageFrom: ['src/**/*.ts', '!src/**/test/*.ts?(x)', '!**/node_modules/**'],
coverageThreshold: {
global: {
branches: 1,
functions: 1,
lines: 1,
statements: 1
}
},
coverageReporters: ['text-summary', 'lcov'],
moduleNameMapper: {
'@auth/(.*)': ['<rootDir>/src/features/auth/$1'],
'@user/(.*)': ['<rootDir>/src/features/user/$1'],
'@global/(.*)': ['<rootDir>/src/shared/globals/$1'],
'@service/(.*)': ['<rootDir>/src/shared/services/$1'],
'@socket/(.*)': ['<rootDir>/src/shared/sockets/$1'],
'@worker/(.*)': ['<rootDir>/src/shared/workers/$1'],
'@root/(.*)': ['<rootDir>/src/$1'],
}
};
export default config;