Skip to content

Commit 005e127

Browse files
paulirishalekseykulikov
authored andcommitted
fix case when a.auditProperty is undefined
1 parent 8938f16 commit 005e127

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/utils/annotations.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ exports.setFailedAnnotations = async function setFailedAnnotations(resultsPath)
2727
const assertionsText = assertions.map(a => {
2828
const emoji = a.level === 'error' ? '❌' : '⚠️'
2929
return (
30-
`${emoji} \`${a.auditId}.${a.auditProperty}\` ${a.level === 'error' ? 'failure' : 'warning'} for \`${
31-
a.name
32-
}\` assertion` +
30+
`${emoji} \`${a.auditId}${a.auditProperty ? '.' + a.auditProperty : ''}\` `+
31+
`${a.level === 'error' ? 'failure' : 'warning'} for \`${a.name}\` assertion` +
3332
`${a.auditTitle ? ` (${a.auditTitle}: ${a.auditDocumentationLink})` : ''}\n` +
3433
`Expected ${a.operator} ${a.expected}, but found ${a.actual}`
3534
)

0 commit comments

Comments
 (0)