-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
48 lines (44 loc) · 1.04 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
const { defaults: tsjPreset } = require("ts-jest/presets");
const { tsconfig } = require("./tsconfig.json");
module.exports = {
clearMocks: true,
preset: "ts-jest",
testEnvironment: "jsdom",
testPathIgnorePatterns: ["/node_modules/", "/__testUtils/"],
setupFiles: ["jest-localstorage-mock"],
setupFilesAfterEnv: [
"@testing-library/jest-dom/extend-expect",
"<rootDir>/__testUtils/setupFetch",
"<rootDir>/__testUtils/setupSolidUIReact",
],
transform: {
...tsjPreset.transform,
"\\.(md|ttl)$": "jest-raw-loader",
},
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
moduleNameMapper: {
"\\.(css)$": "identity-obj-proxy",
},
collectCoverage: true,
coveragePathIgnorePatterns: [
"/node_modules/",
"/__testUtils/",
"/src/windowHelpers",
],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100,
},
},
globals: {
"ts-jest": {
tsconfig: {
...tsconfig,
jsx: "react",
},
},
},
};