-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
report(util): ✅ audits should be in Passed Audits #5963
Changes from 2 commits
29738c4
f03931b
6a1715a
55e7208
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 |
---|---|---|
|
@@ -140,7 +140,8 @@ describe('PerfCategoryRenderer', () => { | |
const diagnosticSection = categoryDOM.querySelectorAll('.lh-category > .lh-audit-group')[2]; | ||
|
||
const diagnosticAudits = category.auditRefs.filter(audit => audit.group === 'diagnostics' && | ||
audit.result.score !== 1 && audit.result.scoreDisplayMode !== 'not-applicable'); | ||
audit.result.score < Util.PASS_THRESHOLD && | ||
audit.result.scoreDisplayMode !== 'not-applicable'); | ||
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. oh, sorry, should have put the comment below this line. 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. That's my bad; I should have noticed the check showAsPassed. 👍 Fixed in latest commit. |
||
const diagnosticElements = diagnosticSection.querySelectorAll('.lh-audit'); | ||
assert.equal(diagnosticElements.length, diagnosticAudits.length); | ||
}); | ||
|
@@ -151,7 +152,8 @@ describe('PerfCategoryRenderer', () => { | |
|
||
const passedAudits = category.auditRefs.filter(audit => | ||
audit.group && audit.group !== 'metrics' && | ||
(audit.result.score === 1 || audit.result.scoreDisplayMode === 'not-applicable')); | ||
(audit.result.score >= Util.PASS_THRESHOLD || | ||
audit.result.scoreDisplayMode === 'not-applicable')); | ||
const passedElements = passedSection.querySelectorAll('.lh-audit'); | ||
assert.equal(passedElements.length, passedAudits.length); | ||
}); | ||
|
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.
@paulirish was there a historical reason for this not just being
!Util.showAsPassed(audit.result)
?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.
nope. that sounds great.
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.
👍 Sorted in 6a1715a.