Skip to content

Commit 90b43b0

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents aceae05 + 07fd067 commit 90b43b0

6 files changed

Lines changed: 1385 additions & 934 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,16 @@ or via adding a key to `package.json` named "jest-html-reporter":
8484
## 📌 Configuration Options (All Optional)
8585

8686
| Option | Type | Default | Description |
87-
|-------------------------------------| ------------------------------------------ | --------------------- |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
87+
| ----------------------------------- | ------------------------------------------ | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
8888
| **`additionalInformation`** | `Array<{ label: string; value: string; }>` | `null` | A list of additional information to be added to the top of the report. |
8989
| **`append`** | `boolean` | `false` | Append test results to an existing report. |
9090
| **`boilerplate`** | `string` | `null` | Path to an HTML boilerplate file. The `{jesthtmlreporter-content}` variable will be replaced with test results. |
9191
| **`collapseSuitesByDefault`** | `boolean` | `false` | Collapse test suites (accordions) by default. |
9292
| **`customScriptPath`** | `string` | `null` | Path to an external script file injected into the report. |
9393
| **`dateFormat`** | `string` | `yyyy-mm-dd HH:MM:ss` | Date format for timestamps. See [documentation](https://github.com/Hargne/jest-html-reporter/wiki/Date-Format) for available formats. |
9494
| **`executionTimeWarningThreshold`** | `number` | `5` | Warn if a test suite exceeds this execution time (in seconds). |
95-
| **`includeConsoleLog`** | `boolean` | `false` | Include `console.log` outputs in the report (**requires** `--verbose=false`). |
9695
| **`hideConsoleLogOrigin`** | `boolean` | `true` | Hide `console.log` origin (stack trace) in the report (**requires** `--verbose=false`). |
96+
| **`includeConsoleLog`** | `boolean` | `false` | Include `console.log` outputs in the report (**requires** `--verbose=false`). |
9797
| **`includeFailureMsg`** | `boolean` | `false` | Show detailed error messages for failed tests. |
9898
| **`includeStackTrace`** | `boolean` | `true` | Show stack traces for failed tests. |
9999
| **`includeSuiteFailure`** | `boolean` | `false` | Show detailed errors for entire failed test suites. |

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jest-html-reporter",
3-
"version": "4.1.0",
3+
"version": "4.2.0",
44
"description": "Jest test results processor for generating a summary in HTML",
55
"main": "dist/index.js",
66
"unpkg": "dist/index.js",
@@ -38,36 +38,36 @@
3838
"node": ">=14.0.0"
3939
},
4040
"dependencies": {
41-
"@jest/reporters": "^29.7.0",
42-
"@jest/test-result": "^29.7.0",
43-
"@jest/types": "^29.6.3",
41+
"@jest/reporters": "^30.0.2",
42+
"@jest/test-result": "^30.0.2",
43+
"@jest/types": "^30.0.1",
4444
"dateformat": "3.0.2",
4545
"mkdirp": "^1.0.3",
4646
"strip-ansi": "6.0.1",
4747
"xmlbuilder": "15.0.0"
4848
},
4949
"peerDependencies": {
50-
"jest": "19.x - 29.x",
50+
"jest": "19.x - 30.x",
5151
"typescript": "^3.7.x || ^4.3.x || ^5.x"
5252
},
5353
"devDependencies": {
5454
"@eslint/js": "^9.19.0",
55-
"@jest/console": "^29.7.0",
55+
"@jest/console": "^30.0.2",
5656
"@rollup/plugin-commonjs": "^28.0.2",
5757
"@rollup/plugin-node-resolve": "^16.0.0",
5858
"@rollup/plugin-terser": "^0.4.4",
5959
"@rollup/plugin-typescript": "^12.1.2",
6060
"@types/dateformat": "^3.0.X",
61-
"@types/jest": "^29.5.14",
61+
"@types/jest": "^30.0.0",
6262
"@types/mkdirp": "1.0.2",
6363
"@types/node": "^22.13.0",
6464
"@types/sinon": "9.0.11",
6565
"eslint": "^9.19.0",
66-
"jest": "^29.7.0",
67-
"jest-environment-jsdom": "^29.7.0",
66+
"jest": "^30.0.2",
67+
"jest-environment-jsdom": "^30.0.2",
6868
"rollup": "^4.34.1",
6969
"sinon": "^9.0.1",
70-
"ts-jest": "^29.0.0",
70+
"ts-jest": "^29.4.0",
7171
"tslib": "^2.8.1",
7272
"tslint-config-prettier": "^1.18.0",
7373
"typescript": "^5.7.3",

src/__mock__/mockAggregatedResultMultiple.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ const mockAggregatedResultMultiple: AggregatedResult = {
6565
end: 1498476640,
6666
runtime: 148,
6767
slow: false,
68+
loadTestEnvironmentEnd: 1498476492,
69+
loadTestEnvironmentStart: 0,
70+
setupAfterEnvEnd: 1498476492,
71+
setupAfterEnvStart: 0,
72+
setupFilesEnd: 1498476492,
73+
setupFilesStart: 0,
6874
},
6975
testFilePath: "test1-passed.js",
7076
},
@@ -131,6 +137,12 @@ const mockAggregatedResultMultiple: AggregatedResult = {
131137
end: 1498476639,
132138
runtime: 147,
133139
slow: false,
140+
loadTestEnvironmentEnd: 1498476492,
141+
loadTestEnvironmentStart: 0,
142+
setupAfterEnvEnd: 1498476492,
143+
setupAfterEnvStart: 0,
144+
setupFilesEnd: 1498476492,
145+
setupFilesStart: 0,
134146
},
135147
testFilePath: "test2-pending-failed-passed.js",
136148
},
@@ -208,6 +220,12 @@ const mockAggregatedResultMultiple: AggregatedResult = {
208220
end: 1498476650,
209221
runtime: 158,
210222
slow: false,
223+
loadTestEnvironmentEnd: 1498476492,
224+
loadTestEnvironmentStart: 0,
225+
setupAfterEnvEnd: 1498476492,
226+
setupAfterEnvStart: 0,
227+
setupFilesEnd: 1498476492,
228+
setupFilesStart: 0,
211229
},
212230
testFilePath: "test3-pending-failed-passed-todo.js",
213231
},
@@ -239,6 +257,12 @@ const mockAggregatedResultMultiple: AggregatedResult = {
239257
end: 0,
240258
runtime: 0,
241259
slow: false,
260+
loadTestEnvironmentEnd: 1498476492,
261+
loadTestEnvironmentStart: 0,
262+
setupAfterEnvEnd: 1498476492,
263+
setupAfterEnvStart: 0,
264+
setupFilesEnd: 1498476492,
265+
setupFilesStart: 0,
242266
},
243267
testFilePath: "test4-empty.js",
244268
},

src/__mock__/mockAggregatedResultSingle.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ export const mockAggregatedResultSingle: AggregatedResult = {
1616
end: 1498476650,
1717
runtime: 158,
1818
slow: false,
19+
loadTestEnvironmentEnd: 1498476492,
20+
loadTestEnvironmentStart: 0,
21+
setupAfterEnvEnd: 1498476492,
22+
setupAfterEnvStart: 0,
23+
setupFilesEnd: 1498476492,
24+
setupFilesStart: 0,
1925
},
2026
snapshot: {
2127
added: 0,
@@ -72,4 +78,4 @@ export const mockAggregatedResultSingle: AggregatedResult = {
7278
},
7379
],
7480
};
75-
export default mockAggregatedResultSingle;
81+
export default mockAggregatedResultSingle;

src/__mock__/mockJestGlobalConfig.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,24 @@ export const mockJestGlobalConfig: Config.GlobalConfig = {
5050
skipFilter: false,
5151
testFailureExitCode: 1,
5252
testNamePattern: undefined,
53-
testPathPattern: "",
53+
testPathPatterns: {
54+
patterns: ["/path/to/tests"],
55+
isSet: jest.fn(),
56+
isValid: jest.fn(),
57+
toPretty: jest.fn(),
58+
toExecutor: jest.fn(),
59+
toJSON: jest.fn(),
60+
},
5461
testResultsProcessor: undefined,
5562
testSequencer: "/path",
5663
testTimeout: undefined,
5764
updateSnapshot: "new",
5865
useStderr: false,
5966
verbose: undefined,
67+
waitForUnhandledRejections: true,
6068
watch: false,
6169
watchAll: false,
6270
watchPlugins: undefined,
6371
watchman: true,
6472
};
65-
export default mockJestGlobalConfig;
73+
export default mockJestGlobalConfig;

0 commit comments

Comments
 (0)