Skip to content

Commit

Permalink
add some debug
Browse files Browse the repository at this point in the history
  • Loading branch information
feedthejim committed Oct 12, 2023
1 parent 230d0d1 commit 76e460f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions run-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ ${ENDGROUP}`)
})
)

console.log('DEBUG - tests failed', errorsPerTests.size)
if (process.env.CI && errorsPerTests.size > 0) {
const toIDHash = (str) => {
let hash = 0,
Expand All @@ -653,7 +654,7 @@ ${ENDGROUP}`)
const outputTemplate = `
## Output per test
${Object.entries(errorsPerTests)
${Array.from(errorsPerTests.entries())
.map(([test, output]) => {
return `
### <a name="${toIDHash(test)}">${test}</a>
Expand All @@ -666,6 +667,7 @@ ${ENDGROUP}`)
.join('\n')}
`

console.log('DEBUG - outputTemplate', outputTemplate)
await core.summary
.addHeading('Test failures')
.addTable([
Expand All @@ -679,7 +681,7 @@ ${ENDGROUP}`)
header: true,
},
],
...Object.entries(errorsPerTests).map(([test]) => {
...Array.from(errorsPerTests.entries()).map(([test]) => {
return [test, `[Link](#${toIDHash(test)})`]
}),
])
Expand Down

0 comments on commit 76e460f

Please sign in to comment.