mirror of
https://github.com/dorny/test-reporter.git
synced 2026-02-03 19:55:22 -08:00
Fix badge encoding for values including the _ underscore character
This commit is contained in:
@@ -31,6 +31,16 @@ describe('getBadge', () => {
|
||||
expect(badge).toBe('')
|
||||
})
|
||||
|
||||
it('handles badge title with multiple underscores', () => {
|
||||
const options: ReportOptions = {
|
||||
...DEFAULT_OPTIONS,
|
||||
badgeTitle: 'my_integration_test'
|
||||
}
|
||||
const badge = getBadge(10, 0, 0, options)
|
||||
// All underscores in the title should be encoded as __
|
||||
expect(badge).toBe('')
|
||||
})
|
||||
|
||||
it('handles badge title with version format containing hyphen', () => {
|
||||
const options: ReportOptions = {
|
||||
...DEFAULT_OPTIONS,
|
||||
|
||||
Reference in New Issue
Block a user