-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ts
More file actions
37 lines (35 loc) · 1.01 KB
/
jest.config.ts
File metadata and controls
37 lines (35 loc) · 1.01 KB
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
import type { Config } from "jest";
const config: Config = {
testEnvironment: "node",
clearMocks: true,
testMatch: [
"<rootDir>/test/**/*.spec.ts",
"<rootDir>/test/**/*.test.ts",
"<rootDir>/src/**/*.spec.ts",
],
transform: {
"^.+\\.ts$": ["ts-jest", { tsconfig: "tsconfig.json" }],
},
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/src/$1",
"^@auth/(.*)$": "<rootDir>/src/auth/$1",
"^@users/(.*)$": "<rootDir>/src/users/$1",
"^@roles/(.*)$": "<rootDir>/src/roles/$1",
"^@models/(.*)$": "<rootDir>/src/models/$1",
"^@middleware/(.*)$": "<rootDir>/src/middleware/$1",
"^@providers/(.*)$": "<rootDir>/src/providers/$1",
"^@config/(.*)$": "<rootDir>/src/config/$1",
"^@utils/(.*)$": "<rootDir>/src/utils/$1",
},
collectCoverageFrom: ["src/**/*.ts", "!src/**/*.d.ts", "!src/**/index.ts"],
coverageDirectory: "coverage",
coverageThreshold: {
global: {
branches: 0,
functions: 0,
lines: 0,
statements: 0,
},
},
};
export default config;