Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine committed Apr 18, 2024
1 parent 8a54a4b commit ca7fddc
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions viewer/test/viewer-test-pptr.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,14 @@ describe('Lighthouse Viewer', () => {
'work-during-interaction',
];
for (const category of lighthouseCategories) {
let expected = getAuditsOfCategory(category);
if (category === 'performance') {
expected = getAuditsOfCategory(category)
.filter(a => a.group !== 'hidden' && !nonNavigationAudits.includes(a.id));
}
expected = expected.map(audit => audit.id);
const expectedAuditIds = getAuditsOfCategory(category)
.filter(a => a.group !== 'hidden' && !nonNavigationAudits.includes(a.id))
.map(a => a.id);
const elementIds = await getAuditElementsIds({category, selector: selectors.audits});

assert.deepStrictEqual(
elementIds.sort(),
expected.sort(),
expectedAuditIds.sort(),
`${category} does not have the identical audits`
);
}
Expand Down

0 comments on commit ca7fddc

Please sign in to comment.