mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[test] add test for prependPath option
This commit is contained in:
parent
9a534c6ff6
commit
e44fabe58a
@ -140,6 +140,16 @@ describe('lib/http-proxy/common.js', function () {
|
||||
|
||||
expect(outgoing.path).to.eql('some-path/am');
|
||||
});
|
||||
|
||||
it('should not prepend the target path to the outgoing path with prependPath = false', function () {
|
||||
var outgoing = {};
|
||||
common.setupOutgoing(outgoing, {
|
||||
target: { path: 'hellothere' },
|
||||
prependPath: false
|
||||
}, { url: 'hi' });
|
||||
|
||||
expect(outgoing.path).to.eql('hi');
|
||||
})
|
||||
});
|
||||
|
||||
describe('#setupSocket', function () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user