first-pass at proxyRoutes

This commit is contained in:
Lloyd Brookes
2015-11-15 11:59:45 +00:00
parent b116426640
commit 7bfbeaa030
6 changed files with 132 additions and 17 deletions

View File

@ -0,0 +1 @@
one

View File

@ -119,3 +119,27 @@ test('blacklist', function (t) {
})
})
})
test.skip('directories: should serve index and static files', function(t){
t.plan(1)
const app = localWebServer({
log: { format: 'none' },
directories: [
__dirname + '/fixture/one'
]
})
launchServer(app, { path: '/something.php', onSuccess: response => {
t.ok(/text\/plain/.test(response.res.headers['content-type']))
}})
})
test('proxy', function(t){
t.plan(1)
const app = localWebServer({
log: { format: 'none' },
proxy: []
})
launchServer(app, { path: '/something.php', onSuccess: response => {
t.ok(/text\/plain/.test(response.res.headers['content-type']))
}})
})