forked from omedym/etk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.unit.config.js
65 lines (64 loc) · 1.79 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
53
54
55
56
57
58
59
60
61
62
63
64
65
module.exports = {
preset: 'ts-jest',
// collectCoverage: true,
coverageDirectory: process.env.COVERAGE_DIR,
coverageReporters: [ "text-summary", "lcov" ],
haste: {
enableSymlinks: true,
},
testEnvironment: 'node',
testPathIgnorePatterns: ['/node_modules/'],
testMatch: [
'**/*.{spec,test}.{ts,tsx}',
// '**/*.unit.{spec,test}.{ts,tsx}',
'!**/*.{integration,service}.{spec,test}.{ts,tsx}',
],
transform: {
// '^.+\\.[tj]sx?$' to process js/ts with `ts-jest`
// '^.+\\.m?[tj]sx?$' to process js/ts/mjs/mts with `ts-jest`
'^.+\\.tsx?$': [
'ts-jest',
{
// tsconfig: 'tsconfig.bazel.json',
// KEEP IN SYNC WITH `tsconfig.bazel.json`
tsconfig: {
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
"composite": true,
"declaration": true,
"emitDecoratorMetadata": true,
"esModuleInterop": true,
"experimentalDecorators": true,
"forceConsistentCasingInFileNames": true,
// "importHelpers": true,
"incremental": true,
"inlineSourceMap": true,
"lib": ["ESNext"],
"jsx": "react",
"module": "CommonJS",
"moduleResolution": "Node",
"resolveJsonModule": true,
"rootDir": ".",
// "skipDefaultLibCheck": false,
"skipLibCheck": true,
"strict": true,
"strictNullChecks": true,
"strictPropertyInitialization": false,
"target": "ESNext",
// "types": ["Node"],
"noImplicitAny": true,
"noImplicitReturns": true,
},
},
],
},
verbose: false,
coverageThreshold: {
global: {
// branches: 50,
// functions: 15,
// lines: 50,
// statements: -10,
},
},
};