File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( ) {
You can’t perform that action at this time.
0 commit comments