Skip to content

Commit

Permalink
fix formatting and unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jazyan committed Jul 5, 2023
1 parent 1ffcf41 commit 62ee141
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions report/renderer/category-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,7 @@ export class CategoryRenderer {

for (const auditRef of auditRefs) {
const groupId = auditRef.group || notAGroup;
if (groupId === 'hidden') {
continue;
}
if (groupId === 'hidden') continue;
const groupAuditRefs = grouped.get(groupId) || [];
groupAuditRefs.push(auditRef);
grouped.set(groupId, groupAuditRefs);
Expand Down
7 changes: 3 additions & 4 deletions report/test/renderer/category-renderer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,10 @@ describe('CategoryRenderer', () => {

categoryGroupIds.forEach(groupId => {
const selector = `.lh-audit-group--${groupId}`;
if (groupId === 'hidden') {
continue;
if (groupId !== 'hidden') {
assert.equal(categoryElem.querySelectorAll(selector).length, 1,
`could not find '${selector}'`);
}
assert.equal(categoryElem.querySelectorAll(selector).length, 1,
`could not find '${selector}'`);
});
});
});
Expand Down

0 comments on commit 62ee141

Please sign in to comment.