-
Notifications
You must be signed in to change notification settings - Fork 56
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
Conversation
@@ -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 || {}; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
commit: |
✅ Testplane run succeed
|
@@ -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 || {}; |
There was a problem hiding this comment.
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.
c885f85
to
b33bd1a
Compare
No description provided.