Skip to content

Commit d145152

Browse files
committed
Add test for #747
1 parent 87a92a7 commit d145152

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/lib-http-proxy-common-test.js

+11
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,17 @@ describe('lib/http-proxy/common.js', function () {
299299
expect(outgoing.ciphers).eql('my-ciphers');
300300
expect(outgoing.secureProtocol).eql('my-secure-protocol');
301301
});
302+
303+
// url.parse('').path => null
304+
it('should not pass null as last arg to #urlJoin', function(){
305+
var outgoing = {};
306+
common.setupOutgoing(outgoing, {target:
307+
{ path: '' }
308+
}, { url : '' });
309+
310+
expect(outgoing.path).to.be('/');
311+
});
312+
302313
});
303314

304315
describe('#setupSocket', function () {

0 commit comments

Comments
 (0)