-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
24 lines (23 loc) · 797 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
const { resolve } = require("path");
const root = resolve(__dirname);
module.exports = {
rootDir: root,
displayName: "root-tests",
setupFiles: ["<rootDir>/jest-setupEnv.ts"],
setupFilesAfterEnv: ["<rootDir>/test/jest-setup.ts"],
testMatch: ["<rootDir>/src/**/*.test.ts"],
testEnvironment: "node",
clearMocks: true,
preset: "ts-jest",
moduleNameMapper: {
"@clients/(.*)": "<rootDir>/src/clients/$1",
"@controllers": "<rootDir>/src/controllers",
"@fixtures/(.*)": "<rootDir>/test/fixtures/$1",
"@middlewares/(.*)": "<rootDir>/src/middlewares/$1",
"@models": "<rootDir>/src/models",
"@services/(.*)": "<rootDir>/src/services/$1",
"@src/(.*)": "<rootDir>/src/$1",
"@test/(.*)": "<rootDir>/test/$1",
"@util/(.*)": "<rootDir>/src/util/$1",
},
};