Files
shields/service-tests/codecov.js
T
Paul MelnikowandGitHub c3636e7549 Clean up service tests (#1127)
- Consolidate regexes
- Use slimmer syntax where possible
- Fix bug caught by failing amo tests
2017-10-09 14:41:18 -04:00

23 lines
615 B
JavaScript

'use strict';
const Joi = require('joi');
const ServiceTester = require('./runner/service-tester');
const { isPercentage } = require('./helpers/validators');
const t = new ServiceTester({ id: 'codecov', title: 'Codecov.io' });
module.exports = t;
t.create('gets coverage status')
.get('/c/github/codecov/example-python.json')
.expectJSONTypes(Joi.object().keys({
name: 'coverage',
value: isPercentage
}));
t.create('gets coverate status for branch')
.get('/c/github/codecov/example-python/master.json')
.expectJSONTypes(Joi.object().keys({
name: 'coverage',
value: isPercentage
}));