Skip to content

Commit

Permalink
replace label in hn-user-karma with U/
Browse files Browse the repository at this point in the history
  • Loading branch information
tapanchudasama committed Jan 18, 2022
1 parent b6d0d24 commit ecdbd08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion services/hackernews/hackernews-user-karma.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class HackerNewsUserKarma extends BaseJsonService {
static render({ karma, id }) {
const color = karma > 0 ? 'brightgreen' : karma === 0 ? 'orange' : 'red'
return {
label: id,
label: `U/${id} karma`,
message: metric(karma),
color,
style: 'social',
Expand Down
4 changes: 2 additions & 2 deletions services/hackernews/hackernews-user-karma.tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { isMetricAllowNegative } from '../test-validators.js'
export const t = await createServiceTester()

t.create('valid repo').get('/pg.json').expectBadge({
label: 'pg',
label: 'U/pg karma',
message: isMetricAllowNegative,
})

Expand All @@ -16,7 +16,7 @@ t.create('valid repo -- negative karma')
.reply(200, { karma: -1234 })
)
.expectBadge({
label: 'negative',
label: 'U/negative karma',
message: isMetricAllowNegative,
})

Expand Down

0 comments on commit ecdbd08

Please sign in to comment.