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:
24
services/github/github-last-commit.tester.js
Normal file
24
services/github/github-last-commit.tester.js
Normal 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' })
|
Reference in New Issue
Block a user