-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
31 lines (29 loc) · 1022 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
25
26
27
28
29
30
31
const path = require("path");
const toPath = path_ => path.join(process.cwd(), path_);
module.exports = {
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
modulePathIgnorePatterns: ["/dist/"],
verbose: false,
setupFilesAfterEnv: ["jest-enzyme"],
testEnvironment: "enzyme",
moduleNameMapper: {
"^@pforte/adapter-mongoose": toPath("packages/adapter-mongoose/src"),
"^@contour/client": toPath("packages/client/src"),
"^@pforte/constants": toPath("packages/constants/src"),
"^@contour/core": toPath("packages/core/src"),
"^@contour/provider-github": toPath("packages/provider-github/src"),
"^@pforte/react": toPath("packages/react/src"),
"^@pforte/utils": toPath("packages/react/src"),
},
transformIgnorePatterns: [
"node_modules/(?!(jest-)?react-native|react-(native|universal|navigation)-(.*)|@react-native-community/(.*)|@react-navigation/(.*)|bs-platform)",
],
transform: {
"^.+\\.tsx?$": "ts-jest",
},
globals: {
"ts-jest": {
tsConfig: "./tsconfig.json",
},
},
};