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