-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
42 lines (36 loc) · 835 Bytes
/
jest.config.js
File metadata and controls
42 lines (36 loc) · 835 Bytes
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
38
39
40
41
42
const moduleFileExtensions = [
"web.mjs",
"mjs",
"web.js",
"js",
"web.ts",
"ts",
"web.tsx",
"tsx",
"json",
"web.jsx",
"jsx",
];
module.exports = {
roots: ["<rootDir>"],
testMatch: ["<rootDir>/.storybook/storyshots.test.ts"],
transform: {
"^.+\\.(ts|tsx)$": "ts-jest",
},
transformIgnorePatterns: [
"[/\\\\]node_modules[/\\\\].+\\.(js|jsx|mjs|cjs|ts|tsx)$",
"^.+\\.module\\.(css|sass|scss)$",
],
moduleNameMapper: {
"^react-native$": "react-native-web",
"^d3-(.*)$": `d3-$1/dist/d3-$1`,
"^d3$": `d3/dist/d3`,
"^.+\\.module\\.(css|sass|scss)$": "identity-obj-proxy",
},
moduleFileExtensions: [...moduleFileExtensions, "node"].filter(
(ext) => !ext.includes("mjs"),
),
collectCoverage: true,
coverageDirectory: "coverage",
testEnvironment: "jsdom",
};