Files
shields/services/github/gist/github-gist-stars.tester.js
chris48s c8a0a8660e tidy up [GitHubGist] routes (#8510)
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
2022-11-04 19:43:14 +00:00

26 lines
665 B
JavaScript

import { createServiceTester } from '../../tester.js'
import { isMetric } from '../../test-validators.js'
export const t = await createServiceTester()
t.create('Gist Total Stars')
.get('/47a4d00457a92aa426dbd48a18776322.json')
.expectBadge({
label: 'Stars',
message: isMetric,
color: 'blue',
link: [
'https://gist.github.com/47a4d00457a92aa426dbd48a18776322',
'https://gist.github.com/maratori/47a4d00457a92aa426dbd48a18776322/stargazers',
],
})
t.create('Gist Total Stars (Not Found)')
.get('/invalid-gist-id.json')
.expectBadge({
label: 'Stars',
message: 'gist not found',
color: 'red',
link: [],
})