This commit is contained in:
Pierre Chalamet 2025-10-25 11:54:26 +02:00 committed by GitHub
commit 4dec797f6d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 37 additions and 18 deletions

View file

@ -146,7 +146,7 @@ function getBadge(passed: number, failed: number, skipped: number, options: Repo
}
const hint = failed > 0 ? 'Tests failed' : 'Tests passed successfully'
const uri = encodeURIComponent(`${options.badgeTitle}-${message}-${color}`)
return `![${hint}](https://img.shields.io/badge/${uri})`
return `[![${hint}](https://img.shields.io/badge/${uri})](#user-content-test-report)`
}
function getTestRunsReport(testRuns: TestRunResult[], options: ReportOptions): string[] {
@ -157,6 +157,8 @@ function getTestRunsReport(testRuns: TestRunResult[], options: ReportOptions): s
sections.push(` `)
}
sections.push('# <a name="user-content-test-report"></a> Tests report')
if (testRuns.length > 0 || options.onlySummary) {
const tableData = testRuns
.map((tr, originalIndex) => ({tr, originalIndex}))