-
Notifications
You must be signed in to change notification settings - Fork 165
Expand file tree
/
Copy pathjest.config.js
More file actions
50 lines (47 loc) · 1.08 KB
/
jest.config.js
File metadata and controls
50 lines (47 loc) · 1.08 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
38
39
40
41
42
43
44
45
46
47
48
49
50
const transformIgnorePatterns = [
"@emotion\/.*",
"@mui\/.*",
"d3",
"d3-dag",
"history",
"http-proxy-middleware",
"install",
"jest-canvas-mock",
"js-sha3",
"js-yaml",
"lodash",
"luxon",
"mnemonic-browser",
"postcss",
"react",
"react-.*",
"remark-gfm",
"styled-components",
].join("|");
/** @type {import('jest').Config} */
const config = {
preset: "ts-jest",
moduleNameMapper: {
"\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/ui/lib/fileMock.js",
"\\.(css|less)$": "<rootDir>/ui/lib/fileMock.js",
"^.+\\.svg$": "jest-transformer-svg",
},
transform: {
"\\.tsx?$": "ts-jest",
"\\.jsx?$": [
"babel-jest",
{
configFile: "./babel.config.testing.json",
},
],
},
transformIgnorePatterns: [`/node_modules/(?:${transformIgnorePatterns})/`],
setupFilesAfterEnv: ["<rootDir>/setup-jest.ts"],
modulePathIgnorePatterns: ["<rootDir>/dist/"],
testEnvironment: "jsdom",
testEnvironmentOptions: {
url: "http://localhost",
},
};
export default config;