generated from DeskproApps/app-template-vite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
46 lines (44 loc) · 1.28 KB
/
jest.config.js
File metadata and controls
46 lines (44 loc) · 1.28 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
/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/en/configuration.html
*/
const esModules = ["d3-array", "d3-hierarchy", "internmap", "d3-scale", "pretty-bytes"].join("|");
module.exports = {
clearMocks: true,
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
testEnvironment: "jsdom",
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
modulePathIgnorePatterns: ["/node_modules/", ".dist"],
maxWorkers: "75%",
transform: {
"^.+\\.(js|jsx|ts|tsx)$": "ts-jest",
},
moduleNameMapper: {
"\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/jest/fileTransform.js",
"\\.(css|less)$": "<rootDir>/jest/fileTransform.js",
},
collectCoverageFrom: ["<rootDir>/src/**/*.{ts,tsx}"],
coveragePathIgnorePatterns: [
"node_modules",
".gen.ts",
"testing",
"__tests__",
"__mocks__",
".test.ts",
".test.tsx",
".stories.tsx",
".dist",
".d.ts",
"mocks",
".app-story.tsx",
"main.tsx",
],
coverageThreshold: {
global: {
branches: 1,
functions: 0,
lines: 0,
},
},
};