mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 13:57:09 +01:00
Add unit tests for getBadge() function to ensure values are encoded for img.shields.io service
This commit is contained in:
parent
de77f76b7e
commit
6079ce3d17
2 changed files with 111 additions and 1 deletions
|
|
@ -125,7 +125,7 @@ function getReportBadge(results: TestRunResult[], options: ReportOptions): strin
|
|||
return getBadge(passed, failed, skipped, options)
|
||||
}
|
||||
|
||||
function getBadge(passed: number, failed: number, skipped: number, options: ReportOptions): string {
|
||||
export function getBadge(passed: number, failed: number, skipped: number, options: ReportOptions): string {
|
||||
const text = []
|
||||
if (passed > 0) {
|
||||
text.push(`${passed} passed`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue