-
Notifications
You must be signed in to change notification settings - Fork 17
/
jest.config.js
36 lines (34 loc) · 1.08 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
31
32
33
34
35
36
module.exports = {
transform: {
"^.+\\.(js|jsx)?$": "babel-jest",
},
testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.ts?$",
preset: "ts-jest",
transform: {
"^.+\\.(t|j)sx?$": "ts-jest",
},
testEnvironment: "node",
globals: {
jsx: "react",
"ts-jest": {
tsConfig: "tsconfig.jest.json",
},
},
setupFiles: ["<rootDir>/tests/test-setup.ts"],
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
transformIgnorePatterns: ["<rootDir>/node_modules/"],
moduleNameMapper: {
"@graphql/(.*)": "<rootDir>/graphql/$1",
"@constants/(.*)": "<rootDir>/constants/$1",
"@views/(.*)": "<rootDir>/views/$1",
"@views/(.*)": "<rootDir>/views/$1",
"@viewsUi/(.*)": "<rootDir>/views/ui/$1",
"@viewsComp/(.*)": "<rootDir>/views/components/$1",
"@viewsLay/(.*)": "<rootDir>/views/layouts/$1",
"@styles/(.*)": "<rootDir>/styles/$1",
"@lib/(.*)": "<rootDir>/lib/$1",
"@assets/(.*)": "<rootDir>/assets/$1",
"@styles/(.*)": "<rootDir>/styles/$1",
"@static/(.*)": "<rootDir>/public/static/$1",
},
};