Skip to content

Commit

Permalink
Filter for failed assertion results
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiDoering authored and alekseykulikov committed Apr 3, 2024
1 parent 1b0e7c3 commit de903bd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/annotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ Expected <= 0, but found 1
export async function setAnnotations(resultsPath) {
const links = await getLinks(resultsPath)
const assertionResults = await getAssertionResults(resultsPath)
if (!assertionResults) return
const failedAssertions = assertionResults?.filter((a) => !a.passed)
if (!failedAssertions) return

const assertionResultsByUrl = mapValues(groupBy(assertionResults, 'url'), (assertions) => {
const assertionResultsByUrl = mapValues(groupBy(failedAssertions, 'url'), (assertions) => {
return orderBy(assertions, (a) => (a.level === 'error' ? 0 : 1) + a.auditId)
})

Expand Down

0 comments on commit de903bd

Please sign in to comment.