Files
shields/services/gem/gem-owner.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

19 lines
393 B
JavaScript

'use strict'
const Joi = require('joi')
const t = (module.exports = require('../create-service-tester')())
t.create('users (valid)')
.get('/raphink.json')
.expectJSONTypes(
Joi.object().keys({
name: 'gems',
value: Joi.string().regex(/^[0-9]+$/),
})
)
t.create('users (not found)')
.get('/not-a-package.json')
.expectJSON({ name: 'gems', value: 'not found' })