This will definitely save time, and ensure more uniformity. It moves the `createServiceTester()` calls to a different place from where I'd like them, though I'm happy to have them checked by the linter. Closes #2701
21 lines
422 B
JavaScript
21 lines
422 B
JavaScript
'use strict'
|
|
|
|
const Joi = require('joi')
|
|
const t = (module.exports = require('../tester').createServiceTester())
|
|
|
|
t.create('Followers')
|
|
.get('/webcaetano.json')
|
|
.expectJSONTypes(
|
|
Joi.object().keys({
|
|
name: 'followers',
|
|
value: Joi.string().regex(/^\w+$/),
|
|
})
|
|
)
|
|
|
|
t.create('Followers (user not found)')
|
|
.get('/PyvesB2.json')
|
|
.expectJSON({
|
|
name: 'followers',
|
|
value: 'user not found',
|
|
})
|