-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
25 lines (25 loc) · 821 Bytes
/
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
module.exports = {
roots: ["<rootDir>/src", "<rootDir>/tests"],
coverageDirectory: "coverage",
coverageProvider: "babel",
collectCoverageFrom: [
"src/**/*.ts",
"!src/**/index.ts",
"!src/main/**/*.ts",
"!src/infra/database/postgres/{migrations,config}/*.ts",
"!src/infra/database/postgres/dataSource.ts",
],
coverageReporters: ["lcov", "text", "json-summary"],
testMatch: ["**/*.spec.ts"],
testEnvironment: "node",
clearMocks: true,
moduleNameMapper: {
"@domain/(.*)": "<rootDir>/src/domain/$1",
"@infra/(.*)": "<rootDir>/src/infra/$1",
"@main/(.*)": "<rootDir>/src/main/$1",
"@presentation/(.*)": "<rootDir>/src/presentation/$1",
"@tests/(.*)": "<rootDir>/tests/$1",
},
transform: { "^.+\\.ts$": ["ts-jest"] },
setupFilesAfterEnv: ["./jest.setup.ts"],
};