Files
shields/services/github/github-commits-since.tester.js
Caleb Cartwright 855c9cd261 Remove dev dep imports in production code (#2937)
Fixes #2876 with @paulmelnikow's suggestion 

Moved imports of `ServiceTester` and `createServiceTester` to a separate file so that dev dependencies are not imported by service classes.
2019-02-05 21:51:55 -05:00

27 lines
674 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?$/),
})
)