-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.ci.ts
More file actions
91 lines (75 loc) · 2.34 KB
/
Copy pathjest.config.ci.ts
File metadata and controls
91 lines (75 loc) · 2.34 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/**
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
*/
import type { Config } from 'jest';
const config: Config = {
// Indicates whether the coverage information should be collected while executing the test
collectCoverage: true,
// The directory where Jest should output its coverage files
coverageDirectory: "./test-reports/coverage",
// An array of regexp pattern strings used to skip coverage collection
coveragePathIgnorePatterns: [
"node_modules",
"dist",
"test-reports",
"storybook-static",
"package.json",
"package-lock.json",
],
// Indicates which provider should be used to instrument code for coverage
coverageProvider: "v8",
// A list of reporter names that Jest uses when writing coverage reports
coverageReporters: [
// ["json-summary", {file: "coverage.json"}],
["lcov", {file: "coverage.info"}],
// ["cobertura", {file: "coverage.xml"}],
"text-summary"
],
// An object that configures minimum threshold enforcement for coverage results
coverageThreshold: {
global: {
branches: 90,
functions: 90,
lines: 90,
statements: 90,
}
},
// Use this configuration option to add custom reporters to Jest
reporters: [
'summary',
[
'github-actions', {
silent: false
}
],
[
"jest-html-reporters", {
"publicPath": "./test-reports/jest",
"filename": "index.html",
"openReport": false,
"pageTitle": "Test Report - @khatastroffik/react-text-renderer-components",
"expand": true,
// "inlineSource": true
// "logoImgPath": "....."
}
]
],
// A list of paths to directories that Jest should use to search for files in
roots: [
"<rootDir>/src"
],
// A list of paths to modules that run some code to configure or set up the testing framework before each test
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
// The test environment that will be used for testing
testEnvironment: "jsdom",
// A map from regular expressions to paths to transformers
transform: {
".(ts|tsx)": "ts-jest"
},
// Indicates whether each individual test should be reported during the run
verbose: false,
// Whether to use watchman for file crawling
watchman: false,
};
export default config;