Files
shields/services/github/github-sponsors.tester.js
2021-04-05 17:20:51 +01:00

24 lines
532 B
JavaScript

'use strict'
const { isMetric } = require('../test-validators')
const { ServiceTester } = require('../tester')
const t = (module.exports = new ServiceTester({
id: 'GithubSponsors',
title: 'Github Sponsors',
pathPrefix: '/github',
}))
t.create('Sponsors').get('/sponsors/Homebrew.json').expectBadge({
label: 'sponsors',
message: isMetric,
color: 'blue',
})
t.create('Sponsors (user not found)')
.get('/sponsors/badges-non-exist.json')
.expectBadge({
label: 'sponsors',
message: 'user/org not found',
})