-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathjest.config.js
More file actions
25 lines (24 loc) · 860 Bytes
/
jest.config.js
File metadata and controls
25 lines (24 loc) · 860 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
/** @type {import('jest').Config} */
const config = {
rootDir: "../../../..",
setupFiles: ["jest-canvas-mock"],
setupFilesAfterEnv: [
"<rootDir>/test/textEncoder.js",
"<rootDir>/test/jestImports.ts",
"<rootDir>/test/resizeObservers.ts",
],
testEnvironment: "jsdom",
preset: "ts-jest",
transformIgnorePatterns: [
// We probably want to mock useStyles which will remove the need for all of this
// "<rootDir>/node_modules/(?!(@backstage|react-markdown|react-syntax-highlighter|@ts-stack|bail|remark-parse|mdast-util-from-markdown|react-js-cron|d3-.*|trough|unified|unist-util-stringify-position|uuid|vfile.*)/)",
],
moduleNameMapper: {
"\\.(scss|svg|sass|css|less)$": "identity-obj-proxy",
},
transform: {
"^.+\\.(ts|tsx)?$": "ts-jest",
"^.+\\.(js|jsx|mjs)$": "babel-jest",
},
};
module.exports = config;