-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
34 lines (26 loc) · 877 Bytes
/
jest.config.ts
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
import type { Config } from "@jest/types";
// Sync object
const config: Config.InitialOptions = {
verbose: true,
globals: {
"ts-jest": {
tsConfigFile: "tsconfig.json",
enableTsDiagnostics: true,
},
},
moduleFileExtensions: ["ts", "tsx", "js"],
// A map from regular expressions to module names that allow to stub out resources with a single module
moduleNameMapper: {
"@root/*": "<rootDir>/src",
"@v1/*": "<rootDir>/src/v1/*",
"@routes/*": "<rootDir>/src/v1/routes/*",
"@controller/*": "<rootDir>/src/v1/controllers/*"
},
testEnvironment: "node",
testRegex: "(/tests/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
transform: {
"^.+\\.(ts|tsx)$": "ts-jest",
},
transformIgnorePatterns: ["<rootDir>/node_modules/(?!@foo)"],
};
export default config;