Skip to content

Commit 7c45128

Browse files
committed
test: add some more "secureEndpoint" props
1 parent adb7c6d commit 7c45128

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,18 @@ describe('HttpsProxyAgent', function () {
114114
var agent = new HttpsProxyAgent('http://127.0.0.1:' + proxyPort);
115115
assert.equal(true, agent.secureEndpoint);
116116
});
117+
it('should be `false` when passed in as an option', function () {
118+
var opts = url.parse('http://127.0.0.1:' + proxyPort);
119+
opts.secureEndpoint = false;
120+
var agent = new HttpsProxyAgent(opts);
121+
assert.equal(false, agent.secureEndpoint);
122+
});
123+
it('should be `true` when passed in as an option', function () {
124+
var opts = url.parse('http://127.0.0.1:' + proxyPort);
125+
opts.secureEndpoint = true;
126+
var agent = new HttpsProxyAgent(opts);
127+
assert.equal(true, agent.secureEndpoint);
128+
});
117129
});
118130
describe('secureProxy', function () {
119131
it('should default to `false`', function () {

0 commit comments

Comments
 (0)