Files
shields/services/debug/debug.tester.js
Paul Melnikow 4bd16f93e8 Sort imports and requires (#3056)
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
2019-02-21 22:14:40 -05:00

17 lines
436 B
JavaScript

'use strict'
const Joi = require('joi')
const t = (module.exports = require('../tester').createServiceTester())
t.create('start time')
.get('/starttime.json')
.expectJSONTypes({ name: 'start time', value: Joi.date().required() })
t.create('Flip: first request')
.get('/flip.json')
.expectJSON({ name: 'flip', value: 'on' })
t.create('Flip: second request')
.get('/flip.json')
.expectJSON({ name: 'flip', value: 'off' })