-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathjest.config.js
44 lines (43 loc) · 1.06 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
// Most of this was taken from: https://github.com/defiantgoat/esri-react-typescript
module.exports = {
setupFiles: [
"jest-canvas-mock",
"<rootDir>/src/setupTests.js"
],
transform: {
"^.+\\.(js|jsx|ts|tsx)?$": "ts-jest",
"^.+\\.(png)": "<rootDir>/src/__mocks__/fileTransformer.js"
},
testRegex: "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js|jsx)$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json"],
moduleNameMapper: {
".+\\.(css|scss)$": "identity-obj-proxy"
},
transformIgnorePatterns: [
"node_modules/(?!(@arcgis|@esri|@stencil)/)"
],
testEnvironment: "jsdom",
setupFilesAfterEnv: ["<rootDir>/src/setupJest.js"],
collectCoverage: true,
coverageDirectory: "./coverage",
collectCoverageFrom: [
"src/**/*.(ts|tsx|js)",
"!src/keys.ts",
"!src/index.tsx",
"!src/tests/*"
],
// "coverageThreshold": {
// "global": {
// "branches": 90,
// "functions": 90,
// "lines": 90
// }
// },
globals: {
"ts-jest": {
"diagnostics": {
"warnOnly": true
}
}
}
}