-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathjest.config.js
59 lines (59 loc) · 1.8 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
module.exports = {
preset: "ts-jest",
testEnvironment: "jsdom",
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
globalSetup: "<rootDir>/jest.globalSetup.js",
transform: {
"^.+\\.jsx?$": "babel-jest",
"^.+\\.svg$": "<rootDir>/scripts/jest/svgTransform.js",
"^.+\\.(ts)x?$": [
"jest-chain-transform",
{
transformers: [
["ts-jest", { diagnostics: true, babelConfig: true }],
[
"jest-ifdef-transform",
{
"ifdef-triple-slash": true,
VITE_ENVIRONMENT: "jest",
},
],
],
},
],
},
testMatch: ["<rootDir>/**/*.test.ts"],
testPathIgnorePatterns: [
"<rootDir>/node_modules",
"<rootDir>/core/extensions/markdown/core/render/logic/Markdoc",
"<rootDir>/.next",
"<rootDir>/public",
"<rootDir>/docs",
"<rootDir>/application",
"<rootDir>/apps/tauri",
],
reporters: ["default", ["jest-junit", { suiteName: "jest tests" }]],
moduleNameMapper: {
"react-dnd": "<rootDir>/app/test/__mocks__/react-dnd.js",
"^lowlight$": "<rootDir>/app/test/__mocks__/lowlight.js",
"^hast-util-to-jsx-runtime$": "<rootDir>/app/test/__mocks__/lowlight.js",
viteenv: "<rootDir>/app/test/__mocks__/mermaid.js",
"\\.(css|scss)$": "identity-obj-proxy",
"^lodash-es(/(.*)|$)": "lodash$1",
"^nanoid(/(.*)|$)": "nanoid$1",
"^@components/(.*)$": "<rootDir>/core/components/$1",
"^@core/(.*)$": "<rootDir>/core/logic/$1",
"^@core-ui/(.*)$": "<rootDir>/core/ui-logic/$1",
"^@ext/(.*)$": "<rootDir>/core/extensions/$1",
"^@app/(.*)$": "<rootDir>/app/$1",
"^@services/(.*)$": "<rootDir>/services/core/$1",
},
transformIgnorePatterns: [
"<rootDir>/node_modules",
"<rootDir>/.next",
"<rootDir>/public",
"<rootDir>/docs",
"<rootDir>/application",
],
coveragePathIgnorePatterns: ["/node_modules/", "(.test)\\.(ts|tsx|js)$", "/distribution/.*\\.(ts|js)$"],
};