1
0
mirror of https://github.com/badges/shields.git synced 2025-07-05 13:41:14 +03:00

Split up [github] testers (#2560)

- Update github contributors badge for `create-service-tester`.
This commit is contained in:
Paul Melnikow
2018-12-19 17:20:15 -05:00
committed by GitHub
parent 382af10506
commit 4e5e3c8aee
21 changed files with 989 additions and 898 deletions

View File

@ -0,0 +1,24 @@
'use strict'
const Joi = require('joi')
const { isFormattedDate } = require('../test-validators')
const t = (module.exports = require('../create-service-tester')())
t.create('last commit (recent)')
.get('/eslint/eslint.json')
.expectJSONTypes(
Joi.object().keys({ name: 'last commit', value: isFormattedDate })
)
t.create('last commit (ancient)')
.get('/badges/badgr.co.json')
.expectJSON({ name: 'last commit', value: 'january 2014' })
t.create('last commit (on branch)')
.get('/badges/badgr.co/shielded.json')
.expectJSON({ name: 'last commit', value: 'july 2013' })
t.create('last commit (repo not found)')
.get('/badges/helmets.json')
.expectJSON({ name: 'last commit', value: 'repo not found' })