8000 fix: do not fail if test statistics is empty by DudaGod · Pull Request #671 · gemini-testing/html-reporter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: do not fail if test statistics is empty #671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 1, 2025

Conversation

DudaGod
Copy link
Member
@DudaGod DudaGod commented May 28, 2025

No description provided.

@@ -4,7 +4,7 @@ export default (state, action) => {
switch (action.type) {
case actionNames.INIT_STATIC_REPORT: {
const {stats} = action.payload;
const {perBrowser, ...restStats} = stats;
const {perBrowser, ...restStats} = stats || {};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When info about tests is not loaded we send payload with stats: null - https://github.com/gemini-testing/html-reporter/blob/master/lib/static/modules/actions/lifecycle.ts#L127

Fixed it here because I'm not sure that someone not use this field with null value in some plugin for html-reporter

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this file is really tiny and if this was in typescript, the error wouldn't have happened. Can we re-write it in typescript?

All actions are now strictly typed.

Copy link
pkg-pr-new bot commented May 28, 2025

Open in StackBlitz

npm i https://pkg.pr.new/gemini-testing/html-reporter@671

commit: b33bd1a

Copy link
github-actions bot commented May 28, 2025

✅ Testplane run succeed

Report

@@ -4,7 +4,7 @@ export default (state, action) => {
switch (action.type) {
case actionNames.INIT_STATIC_REPORT: {
const {stats} = action.payload;
const {perBrowser, ...restStats} = stats;
const {perBrowser, ...restStats} = stats || {};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this file is really tiny and if this was in typescript, the error wouldn't have happened. Can we re-write it in typescript?

All actions are now strictly typed.

@DudaGod DudaGod force-pushed the TESTPLANE-555.cannot_read_perBrowser branch from c885f85 to b33bd1a Compare June 1, 2025 00:52
@DudaGod DudaGod merged commit bfbfa67 into master Jun 1, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0