Files
shields/services/github/github-commits-since.tester.js
Paul Melnikow 226fa67a02 Create shortcut for BaseService-related imports (#2809)
Continue to implement #2698:

- Add `core/base-service/index.js` (but hold off on moving the things it imports)
- Add shortcuts in `services/index.js` for Base*Service, errors, and deprecatedService. This file will be streamlined later to avoid cluttering it with rarely used bits.
- Apply consistent ordering of imports and use of `module.exports` in testers.
- Remove some renaming of imports.
- Remove obsolete tests here and there.
2019-01-21 15:41:24 -05:00

27 lines
667 B
JavaScript

'use strict'
const Joi = require('joi')
const t = (module.exports = require('..').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?$/),
})
)