forked from 5733d9e2be6485d52ffa08870cabdee0/sandbox-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
33 lines (31 loc) · 1.23 KB
/
jest.config.ts
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
/*
* For a detailed explanation regarding each configuration property and type check, visit:
* https://jestjs.io/docs/configuration
*/
import path from "path";
export default {
moduleNameMapper: {
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/__mocks__/fileMock.js",
"\\.(css|less|svg)$":
"<rootDir>/node_modules/@patternfly/react-styles/__mocks__/styleMock.js",
"@patternfly/react-code-editor": path.resolve(
__dirname,
"./__mocks__/react-code-editor.js"
),
"^@app/(.*)$": "<rootDir>/src/app/$1",
"^@i18n/(.*)$": "<rootDir>/src/i18n/$1",
"^@apis/(.*)$": "<rootDir>/src/apis/$1",
"^@constants/(.*)$": "<rootDir>/src/constants/$1",
"^@utils/(.*)$": "<rootDir>/src/utils/$1",
"^@contexts/(.*)$": "<rootDir>/src/contexts/$1",
"^@openapi/(.*)$": "<rootDir>/openapi/$1",
},
reporters: ["default"],
testEnvironment: "jest-environment-jsdom",
testMatch: ["**/*.(spec|steps|test).[jt]s?(x)"],
transformIgnorePatterns: [
"node_modules/(?!@patternfly/react-icons|@patternfly/react-tokens|@novnc|@popperjs|lodash|monaco-editor|react-monaco-editor|byte-size|uniforms)",
],
setupFilesAfterEnv: ["<rootDir>/setupJest.ts"],
};