-
Notifications
You must be signed in to change notification settings - Fork 2
/
jest.config.js
30 lines (30 loc) · 1.07 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
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
rootDir: "src",
moduleNameMapper: {
"^@root/(.*)": "<rootDir>/$1",
"^@classes/(.*)": "<rootDir>/classes/$1",
"^@errors/(.*)": "<rootDir>/errors/$1",
"^@config/(.*)": "<rootDir>/config/$1",
"^@logger/(.*)": "<rootDir>/logger/$1",
"^@middleware/(.*)": "<rootDir>/middleware/$1",
"^@routes/(.*)": "<rootDir>/routes/$1",
"^@utils/(.*)": "<rootDir>/utils/$1",
"^@loaders/(.*)": "<rootDir>/loaders/$1",
"^@database/(.*)": "<rootDir>/database/$1",
"^@services/(.*)": "<rootDir>/services/$1",
"^@validators/(.*)": "<rootDir>/validators/$1",
"^@fixtures/(.*)": "<rootDir>/fixtures/$1",
"^@mocks/(.*)": "<rootDir>/__mocks__/$1",
"^@tests/(.*)": "<rootDir>/tests/$1",
"^@constants/(.*)": "<rootDir>/constants/$1",
},
globalSetup: "<rootDir>/tests/setup.ts",
globalTeardown: "<rootDir>/tests/teardown.ts",
setupFilesAfterEnv: [
"<rootDir>/tests/closeConnection.ts",
"jest-extended/all",
],
}