-
Notifications
You must be signed in to change notification settings - Fork 159
/
Copy pathjest.config.js
45 lines (43 loc) · 997 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/ui/lib/fileMock.js",
"\\.(css|less)$": "<rootDir>/ui/lib/fileMock.js",
},
transform: {
"\\.tsx?$": "ts-jest",
"\\.jsx?$": [
"babel-jest",
{
configFile: "./babel.config.json",
},
],
},
transformIgnorePatterns: [`/node_modules/(?:${transformIgnorePatterns})/`],
setupFilesAfterEnv: ["<rootDir>/setup-jest.ts"],
modulePathIgnorePatterns: ["<rootDir>/dist/"],
testEnvironment: "jsdom",
};
export default config;