Files
shields/services/github/github-contributors.tester.js
2021-07-09 12:53:55 +01:00

23 lines
586 B
JavaScript

import { createServiceTester } from '../tester.js'
import { isMetric } from '../test-validators.js'
export const t = await createServiceTester()
t.create('Contributors').get('/contributors/badges/shields.json').expectBadge({
label: 'contributors',
message: isMetric,
})
t.create('1 contributor')
.get('/contributors/badges/shields-tests.json')
.expectBadge({
label: 'contributors',
message: '1',
})
t.create('Contributors (repo not found)')
.get('/contributors/badges/helmets.json')
.expectBadge({
label: 'contributors',
message: 'repo not found',
})