-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.unit.config.js
52 lines (52 loc) · 1.08 KB
/
jest.unit.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
export default {
clearMocks: true,
// collectCoverage: true,
collectCoverageFrom: [
"./src/**/**.ts",
"!./src/modules.d.ts",
"!./src/Constants.ts",
],
coverageThreshold: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
},
coverageDirectory: "coverage",
coverageProvider: "v8", // "babel"
moduleFileExtensions: [
"ts",
"js"
],
moduleNameMapper: {
"web-worker:(.*)\\.worker.ts": '<rootDir>/src/worker/$1.worker.ts',
},
modulePathIgnorePatterns: [
"./test/unit/__dataset__",
"./test/unit/__mocks__"
],
preset: "ts-jest",
setupFiles: [
"jest-canvas-mock",
"./test/unit/jest.setup.js",
"./test/unit/text-encoder.mock.ts"
],
setupFilesAfterEnv: [
"jest-websocket-mock",
"./test/unit/setupTests.ts"
],
testEnvironment: "jsdom",
testMatch: [
"**/unit/**/**.test.ts"
],
testPathIgnorePatterns: [
"/node_modules/"
],
transform: {
"^.+\\.css$": "jest-transform-css",
"^.+\\.svg$": "<rootDir>/test/unit/svgTransform.js",
},
verbose: false
}