Files
shields/services/github/github-commits-since.tester.js
Pierre-Yves B 25f8541e5b JSON format modernisation and _shields_test removal (#3272)
* Modernised JSON format and removed _shields_test style

* Added logoWidth and labelColor fields to JSON response

* Reinstated and updated comment

* Extended expectBadge to accept Joi schemas for all fields
2019-04-07 18:57:55 +01:00

20 lines
575 B
JavaScript

'use strict'
const Joi = require('joi')
const t = (module.exports = require('../tester').createServiceTester())
t.create('Commits since')
.get('/badges/shields/a0663d8da53fb712472c02665e6ff7547ba945b7.json')
.expectBadge({
label: Joi.string().regex(/^(commits since){1}[\s\S]+$/),
message: Joi.string().regex(/^\w+$/),
color: 'blue',
})
t.create('Commits since by latest release')
.get('/microsoft/typescript/latest.json')
.expectBadge({
label: Joi.string().regex(/^(commits since){1}[\s\S]+$/),
message: Joi.string().regex(/^\d+\w?$/),
})