Skip to content

Commit 89f9ca1

Browse files
committed
[test] show that we support protocol without the colon
1 parent c044856 commit 89f9ca1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

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

+12
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,18 @@ describe('lib/http-proxy/common.js', function () {
185185
expect(outgoing.path).to.eql('some-path/am');
186186
});
187187

188+
it('should properly detect https/wss protocol without the colon', function () {
189+
var outgoing = {};
190+
common.setupOutgoing(outgoing, {
191+
target: {
192+
protocol: 'https',
193+
host: 'whatever.com'
194+
}
195+
}, { url: '/' });
196+
197+
expect(outgoing.port).to.eql(443);
198+
});
199+
188200
it('should not prepend the target path to the outgoing path with prependPath = false', function () {
189201
var outgoing = {};
190202
common.setupOutgoing(outgoing, {

0 commit comments

Comments
 (0)