Skip to content

Commit adb7c6d

Browse files
committed
test: add "secureProxy" property tests
1 parent 3faf8e0 commit adb7c6d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

test/test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,20 @@ describe('HttpsProxyAgent', function () {
115115
assert.equal(true, agent.secureEndpoint);
116116
});
117117
});
118+
describe('secureProxy', function () {
119+
it('should default to `false`', function () {
120+
var agent = new HttpsProxyAgent({ port: proxyPort });
121+
assert.equal(false, agent.secureProxy);
122+
});
123+
it('should be `false` when "http:" protocol is used', function () {
124+
var agent = new HttpsProxyAgent({ port: proxyPort, protocol: 'http:' });
125+
assert.equal(false, agent.secureProxy);
126+
});
127+
it('should be `true` when "https:" protocol is used', function () {
128+
var agent = new HttpsProxyAgent({ port: proxyPort, protocol: 'https:' });
129+
assert.equal(true, agent.secureProxy);
130+
});
131+
});
118132
});
119133

120134
describe('"http" module', function () {

0 commit comments

Comments
 (0)