This commit is contained in:
Lloyd Brookes
2016-02-19 19:28:22 +00:00
parent 8145986987
commit 86a1787540
5 changed files with 11 additions and 9 deletions

View File

@ -259,9 +259,9 @@ test('mock: accepts request filter', function (t) {
})
const server = http.createServer(app.callback())
server.listen(8100, () => {
request('http://localhost:8100/test', { headers: { Accept: '*/json' }})
request('http://localhost:8100/test', { headers: { Accept: '*/json' } })
.then(checkResponse(t, 404))
.then(() => request('http://localhost:8100/test', { headers: { Accept: 'text/plain' }}))
.then(() => request('http://localhost:8100/test', { headers: { Accept: 'text/plain' } }))
.then(checkResponse(t, 200, /test/))
.then(server.close.bind(server))
})