-
Notifications
You must be signed in to change notification settings - Fork 191
/
jest.config.js
42 lines (41 loc) · 987 Bytes
/
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
const { pathsToModuleNameMapper } = require("ts-jest");
const { compilerOptions } = require("./tsconfig.json");
module.exports = {
"testEnvironment": "node",
"testTimeout": 10000,
"setupFilesAfterEnv": [
"<rootDir>/test/setup/setup.ts"
],
"snapshotResolver": "<rootDir>/test/snapshots/snapshot-resolver.ts",
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
],
"modulePathIgnorePatterns": ["<rootDir>/spa"],
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.tsx?$",
"collectCoverage": true,
"coverageDirectory": "coverage",
"coverageThreshold": {
"global": {
"branches": 70,
"functions": 85,
"lines": 85,
"statements": 85,
}
},
"collectCoverageFrom": [
"src/**/*.{ts,tsx}",
"!src/**/*.d.ts",
"!src/util/workers-health-monitor.ts"
],
"maxConcurrency": 1,
"maxWorkers": 1,
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, { prefix: '<rootDir>/' } ),
};