mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-01 02:45:22 -08:00
Fix badge image by correctly encoding the URI components
This commit is contained in:
@@ -145,8 +145,10 @@ function getBadge(passed: number, failed: number, skipped: number, options: Repo
|
||||
color = 'yellow'
|
||||
}
|
||||
const hint = failed > 0 ? 'Tests failed' : 'Tests passed successfully'
|
||||
const uri = encodeURIComponent(`${options.badgeTitle}-${message}-${color}`)
|
||||
return ``
|
||||
const encodedBadgeTitle = encodeImgShieldsURIComponent(options.badgeTitle)
|
||||
const encodedMessage = encodeImgShieldsURIComponent(message)
|
||||
const encodedColor = encodeImgShieldsURIComponent(color)
|
||||
return ``
|
||||
}
|
||||
|
||||
function getTestRunsReport(testRuns: TestRunResult[], options: ReportOptions): string[] {
|
||||
@@ -305,3 +307,7 @@ function getResultIcon(result: TestExecutionResult): string {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
function encodeImgShieldsURIComponent(component: string): string {
|
||||
return encodeURIComponent(component).replace(/-/g, '--')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user