-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathjest.config.js
42 lines (42 loc) · 1.05 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
41
42
module.exports = {
clearMocks: true,
// collectCoverage: true,
// collectCoverageFrom: ['*.{ts}'],
coverageDirectory: "coverage",
"coverageReporters": ["json", ["lcov", {"projectRoot": "./coverage"}], "text"],
coverageThreshold: {
"global": { // TODO
"functions": 5,
"lines": 5,
"statements": 5
}
},
moduleDirectories: [
"node_modules",
],
notify: true,
notifyMode: "failure-change",
preset: 'ts-jest',
roots: [
"test"
],
testEnvironment: "node",
testMatch: [
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[tj]s?(x)"
],
reporters: ['default'],
transform: {
"^.+\\.tsx?$": "ts-jest"
},
verbose: true,
moduleNameMapper: {
"@src/(.*)": ["<rootDir>/src/$1"],
"@adapters/*": ["<rootDir>/src/adapters/$1"],
"@application/(.*)": ["<rootDir>/src/application/$1"],
"@domain/(.*)": ["<rootDir>/src/domain/$1"],
"@config/(.*)": ["<rootDir>/src/config/$1"],
"@infrastructure/(.*)": ["<rootDir>/src/infrastructure/$1"],
"@test/*": ["<rootDir>/test/$1"]
}
};