Files
shields/services/github/github-all-contributors.tester.js
Joe Izzard a17bb10662 Implement All Contributors Badge, run [GitHubAllContributors] (#5163)
* feat: added all-contributors badge and test

* Update services/github/github-all-contributors.service.js

Updated to schema to ensure the array always exists

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* fix: added branch to parameters

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
2020-06-03 22:44:49 -05:00

17 lines
489 B
JavaScript

'use strict'
const t = (module.exports = require('../tester').createServiceTester())
const { isMetric } = require('../test-validators')
t.create('all-contributors repo')
.get('/all-contributors/all-contributors.json')
.expectBadge({
label: 'all contributors',
message: isMetric,
})
t.create('shields repo (not found)').get('/badges/shields.json').expectBadge({
label: 'all contributors',
message: 'repo not found, branch not found, or .all-contributorsrc missing',
})