From d145152655a69479348b0ebc726d4dc19720a12b Mon Sep 17 00:00:00 2001 From: Damon McMinn Date: Wed, 1 Apr 2015 13:14:11 +0100 Subject: [PATCH] Add test for https://github.com/nodejitsu/node-http-proxy/issues/747 --- test/lib-http-proxy-common-test.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/lib-http-proxy-common-test.js b/test/lib-http-proxy-common-test.js index 007ba39..3c6ebd1 100644 --- a/test/lib-http-proxy-common-test.js +++ b/test/lib-http-proxy-common-test.js @@ -299,6 +299,17 @@ describe('lib/http-proxy/common.js', function () { expect(outgoing.ciphers).eql('my-ciphers'); expect(outgoing.secureProtocol).eql('my-secure-protocol'); }); + + // url.parse('').path => null + it('should not pass null as last arg to #urlJoin', function(){ + var outgoing = {}; + common.setupOutgoing(outgoing, {target: + { path: '' } + }, { url : '' }); + + expect(outgoing.path).to.be('/'); + }); + }); describe('#setupSocket', function () {