first-pass at proxyRoutes
This commit is contained in:
1
test/fixture/one/file.txt
Normal file
1
test/fixture/one/file.txt
Normal file
@ -0,0 +1 @@
|
||||
one
|
24
test/test.js
24
test/test.js
@ -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']))
|
||||
}})
|
||||
})
|
||||
|
Reference in New Issue
Block a user