mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[test] add proper failing test case for #738
This commit is contained in:
parent
d98d9516ea
commit
410a8ce94c
@ -1,4 +1,5 @@
|
||||
var common = require('../lib/http-proxy/common'),
|
||||
url = require('url'),
|
||||
expect = require('expect.js');
|
||||
|
||||
describe('lib/http-proxy/common.js', function () {
|
||||
@ -211,6 +212,20 @@ describe('lib/http-proxy/common.js', function () {
|
||||
|
||||
expect(outgoing.path).to.eql('/forward/?foo=bar//&target=http://foobar.com/?a=1%26b=2&other=2');
|
||||
})
|
||||
|
||||
//
|
||||
// This is the proper failing test case for the common.join problem
|
||||
//
|
||||
it('should correctly format the a toProxy URL', function () {
|
||||
var outgoing = {};
|
||||
var google = 'https://google.com'
|
||||
common.setupOutgoing(outgoing, {
|
||||
target: url.parse('http://sometarget.com:80'),
|
||||
toProxy: true,
|
||||
}, { url: google });
|
||||
|
||||
expect(outgoing.path).to.eql('/' + google);
|
||||
})
|
||||
});
|
||||
|
||||
describe('#setupSocket', function () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user