forked from StartBootstrap/sb-clean-blog-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
35 lines (35 loc) · 1.04 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
module.exports = {
preset: 'ts-jest',
globals: {
'ts-jest': {
tsConfig: '<rootDir>/src/tsconfig.spec.json',
ignoreCoverageForAllDecorators: true,
},
},
roots: ['<rootDir>/src', '<rootDir>/src/testing/mocks'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'json'],
transform: {
'^.+\\.tsx?$': 'ts-jest',
},
moduleNameMapper: {
'^@app/(.*)$': '<rootDir>/src/app/$1',
'^@lib/(.*)$': '<rootDir>/src/lib/$1',
'^@models/(.*)$': '<rootDir>/src/models/$1',
'^@testing/(.*)$': '<rootDir>/src/testing/$1',
'^@mocks/(.*)$': '<rootDir>/src/testing/mocks/__mocks__/$1',
},
collectCoverageFrom: [
'<rootDir>/src/**/*.ts',
'!<rootDir>/src/lib/orm/entity/**/*.ts',
'!<rootDir>/src/testing/**/*.ts',
'!<rootDir>/src/migrations/**/*.ts'
],
coverageThreshold: {
"global": {
"branches": 100,
"functions": 100,
"lines": 100,
"statements": 100
}
},
};