[test] show that we support protocol without the colon

This commit is contained in:
Jarrett Cruger 2014-12-08 23:04:41 -05:00
parent c04485671a
commit 89f9ca1e89

View File

@ -185,6 +185,18 @@ describe('lib/http-proxy/common.js', function () {
expect(outgoing.path).to.eql('some-path/am'); expect(outgoing.path).to.eql('some-path/am');
}); });
it('should properly detect https/wss protocol without the colon', function () {
var outgoing = {};
common.setupOutgoing(outgoing, {
target: {
protocol: 'https',
host: 'whatever.com'
}
}, { url: '/' });
expect(outgoing.port).to.eql(443);
});
it('should not prepend the target path to the outgoing path with prependPath = false', function () { it('should not prepend the target path to the outgoing path with prependPath = false', function () {
var outgoing = {}; var outgoing = {};
common.setupOutgoing(outgoing, { common.setupOutgoing(outgoing, {