Skip to content

Commit

Permalink
fix case when a.auditProperty is undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish authored and alekseykulikov committed Apr 10, 2020
1 parent 8938f16 commit 005e127
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/utils/annotations.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ exports.setFailedAnnotations = async function setFailedAnnotations(resultsPath)
const assertionsText = assertions.map(a => {
const emoji = a.level === 'error' ? '❌' : '⚠️'
return (
`${emoji} \`${a.auditId}.${a.auditProperty}\` ${a.level === 'error' ? 'failure' : 'warning'} for \`${
a.name
}\` assertion` +
`${emoji} \`${a.auditId}${a.auditProperty ? '.' + a.auditProperty : ''}\` `+
`${a.level === 'error' ? 'failure' : 'warning'} for \`${a.name}\` assertion` +
`${a.auditTitle ? ` (${a.auditTitle}: ${a.auditDocumentationLink})` : ''}\n` +
`Expected ${a.operator} ${a.expected}, but found ${a.actual}`
)
Expand Down

0 comments on commit 005e127

Please sign in to comment.