mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 13:57:09 +01:00
Fix badge image by correctly encoding the URI components
This commit is contained in:
parent
c883ae9738
commit
de77f76b7e
1 changed files with 8 additions and 2 deletions
|
|
@ -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, '--')
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue