make cli autocannon test run for 2s (#145)

This commit is contained in:
Adam Davis 2019-03-28 14:44:23 +00:00 committed by GitHub
parent 2f485903fb
commit 51d2cb4ecf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,7 +117,7 @@ test('clinic doctor --on-port', function (t) {
test('clinic doctor --autocannon', function (t) {
cli({ relayStderr: false }, [
'clinic', 'doctor', '--no-open',
'--autocannon', '[', '/', '-d', '1', ']',
'--autocannon', '[', '/', '-d', '2', ']',
'--', 'node', '-e', `
const http = require('http')
@ -125,7 +125,7 @@ test('clinic doctor --autocannon', function (t) {
`
], function (err, stdout, stderr) {
t.ifError(err)
t.ok(stderr.indexOf('Running 1s test @ http://localhost:') > -1)
t.ok(stderr.indexOf('Running 2s test @ http://localhost:') > -1)
t.strictEqual(stdout.split('\n')[0], 'Analysing data')
t.end()
})