-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
fix: better debug message for missing network times #2451
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -193,6 +193,12 @@ class CategoryRenderer { | |
const descriptionEl = this._dom.createChildOf(element, 'div', 'lh-perf-hint__description'); | ||
descriptionEl.appendChild(this._dom.convertMarkdownLinkSnippets(audit.result.helpText)); | ||
|
||
if (audit.result.debugString) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is this adding that wasn't there before? Not clear from the screenshot There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it was, but not if it didn't completely fail (this was sort of drive by, there are other debugStrings that can be set) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added a test now for it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
it was...what? :P |
||
const debugStrEl = this._dom.createChildOf(element, 'div', 'lh-debug'); | ||
debugStrEl.textContent = audit.result.debugString; | ||
element.open = true; | ||
} | ||
|
||
if (audit.result.details) { | ||
element.appendChild(this._detailsRenderer.render(audit.result.details)); | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,7 @@ describe('Byte efficiency base audit', () => { | |
const result = ByteEfficiencyAudit.createAuditResult({ | ||
headings: [{key: 'value', text: 'Label'}], | ||
results: [{wastedBytes: 2048, totalBytes: 4096, wastedPercent: 50}], | ||
}); | ||
}, 1000); | ||
|
||
assert.equal(result.extendedInfo.value.results[0].wastedKb, '2 KB'); | ||
assert.equal(result.extendedInfo.value.results[0].totalKb, '4 KB'); | ||
|
@@ -85,7 +85,7 @@ describe('Byte efficiency base audit', () => { | |
{wastedBytes: 450, totalBytes: 1000, wastedPercent: 50}, | ||
{wastedBytes: 400, totalBytes: 450, wastedPercent: 50}, | ||
], | ||
}); | ||
}, 1000); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need new tests, too There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
|
||
assert.equal(result.extendedInfo.value.results[0].wastedBytes, 450); | ||
assert.equal(result.extendedInfo.value.results[1].wastedBytes, 400); | ||
|
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.
can you document this in the jsdoc?
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.
done