Files
shields/services/codecov/codecov.tester.js
Paul Melnikow 8a8311d931 Unify and minimize tester boilerplate (#2472)
I started using this one-line boilerplate a while back and it seems to tidy things up a bit.
2018-12-08 13:15:24 -05:00

29 lines
655 B
JavaScript

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