mirror of
https://github.com/dorny/test-reporter.git
synced 2026-03-21 23:52:12 +01:00
Modernize ESLint configuration
This commit is contained in:
parent
393efa337c
commit
eed2d2d031
8 changed files with 86 additions and 121 deletions
|
|
@ -8,7 +8,9 @@ describe('getBadge', () => {
|
|||
badgeTitle: 'tests'
|
||||
}
|
||||
const badge = getBadge(5, 0, 1, options)
|
||||
expect(badge).toBe('')
|
||||
expect(badge).toBe(
|
||||
''
|
||||
)
|
||||
})
|
||||
|
||||
it('handles badge title with single hyphen', () => {
|
||||
|
|
@ -28,7 +30,9 @@ describe('getBadge', () => {
|
|||
}
|
||||
const badge = getBadge(10, 0, 0, options)
|
||||
// All hyphens in the title should be encoded as --
|
||||
expect(badge).toBe('')
|
||||
expect(badge).toBe(
|
||||
''
|
||||
)
|
||||
})
|
||||
|
||||
it('handles badge title with multiple underscores', () => {
|
||||
|
|
@ -38,7 +42,9 @@ describe('getBadge', () => {
|
|||
}
|
||||
const badge = getBadge(10, 0, 0, options)
|
||||
// All underscores in the title should be encoded as __
|
||||
expect(badge).toBe('')
|
||||
expect(badge).toBe(
|
||||
''
|
||||
)
|
||||
})
|
||||
|
||||
it('handles badge title with version format containing hyphen', () => {
|
||||
|
|
@ -48,7 +54,9 @@ describe('getBadge', () => {
|
|||
}
|
||||
const badge = getBadge(1, 0, 0, options)
|
||||
// The hyphen in "12.0-ubi" should be encoded as --
|
||||
expect(badge).toBe('')
|
||||
expect(badge).toBe(
|
||||
''
|
||||
)
|
||||
})
|
||||
|
||||
it('handles badge title with dots and hyphens', () => {
|
||||
|
|
@ -57,7 +65,9 @@ describe('getBadge', () => {
|
|||
badgeTitle: 'v1.2.3-beta-test'
|
||||
}
|
||||
const badge = getBadge(4, 1, 0, options)
|
||||
expect(badge).toBe('')
|
||||
expect(badge).toBe(
|
||||
''
|
||||
)
|
||||
})
|
||||
|
||||
it('preserves structural hyphens between label and message', () => {
|
||||
|
|
@ -67,7 +77,9 @@ describe('getBadge', () => {
|
|||
}
|
||||
const badge = getBadge(2, 3, 1, options)
|
||||
// The URI should have literal hyphens separating title-message-color
|
||||
expect(badge).toBe('')
|
||||
expect(badge).toBe(
|
||||
''
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
@ -107,7 +119,9 @@ describe('getBadge', () => {
|
|||
it('includes passed, failed and skipped counts', () => {
|
||||
const options: ReportOptions = {...DEFAULT_OPTIONS}
|
||||
const badge = getBadge(5, 2, 1, options)
|
||||
expect(badge).toBe('')
|
||||
expect(badge).toBe(
|
||||
''
|
||||
)
|
||||
})
|
||||
|
||||
it('uses "none" message when no tests', () => {
|
||||
|
|
@ -117,4 +131,3 @@ describe('getBadge', () => {
|
|||
})
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue