-
Notifications
You must be signed in to change notification settings - Fork 27
/
jest.config.js
53 lines (52 loc) · 1.18 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
49
50
51
52
53
module.exports = {
preset: "ts-jest",
testEnvironment: "node",
automock: false,
errorOnDeprecated: true,
notify: false,
notifyMode: "failure",
verbose: true,
testMatch: ["**/unit/**/?(*.)+(test).ts"],
transform: {
"^.+\\.ts?$": "ts-jest",
},
collectCoverage: true,
snapshotFormat: {
escapeString: true,
printBasicPrototype: true,
},
collectCoverageFrom: ["src/**/*.{ts,tsx}"],
coverageDirectory: "reports/test/unit/coverage",
coverageThreshold: {
global: {
branches: 90,
functions: 90,
lines: 90,
statements: 90,
},
},
modulePathIgnorePatterns: [
"<rootDir>/dist/",
"<rootDir>/node_modules/",
"<rootDir>/test/unit/samples/",
"<rootDir>/test/int/test-data/",
"<rootDir>/test/int/test-data-copy/",
],
testPathIgnorePatterns: [
"<rootDir>/node_modules/",
"<rootDir>/dist/",
"<rootDir>/lib/",
],
transformIgnorePatterns: ["<rootDir>/node_modules/", "/node_modules/"],
reporters: [
"default",
[
"jest-sonar",
{
reportedFilePath: "relative",
relativeRootDir: "<rootDir>/../../../",
},
],
],
setupFilesAfterEnv: ["../../jest.setup.js"],
};