Files
shields/services/github/github-commits-since.tester.js
Paul Melnikow 4bd16f93e8 Sort imports and requires (#3056)
This will definitely save time, and ensure more uniformity.

It moves the `createServiceTester()` calls to a different place from where I'd like them, though I'm happy to have them checked by the linter.

Closes #2701
2019-02-21 22:14:40 -05:00

26 lines
673 B
JavaScript

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