logging, compress

This commit is contained in:
Lloyd Brookes
2015-11-12 23:02:38 +00:00
parent b19545d3fc
commit ffc39145ee
4 changed files with 50 additions and 19 deletions

View File

@ -66,3 +66,16 @@ test('log: common', function (t) {
request('http://localhost:8100/')
.then(() => server.close())
})
test('compress', function(t){
const app = localWebServer({ compress: true })
})
function launchServer (app, onSuccess) {
const server = http.createServer(app.callback())
server.listen(8100)
const req = request('http://localhost:8100/')
if (onSuccess) req.then(onSuccess)
req.then(() => server.close())
}