File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -117,6 +117,28 @@ describe("Testing certs", function() {
117117 } ) ( )
118118 } )
119119
120+ it ( "support path with spaces" , function ( done ) {
121+ // inner async function
122+ ( async ( ) => {
123+ // set a custom cert path
124+ process . env . CERT_PATH = "test/custom folder"
125+ // prepare the server with a mock response
126+ app . get ( "/test/module" , ( req , res ) => res . send ( "TEST" ) )
127+ // start the server
128+ await app . listen ( HTTPS_PORT )
129+ // make the request and check the output
130+ await makeRequest ( "/test/module" )
131+ . then ( res => assert ( res . data === "TEST" ) )
132+ // close the server
133+ app . server . close ( )
134+ // delete the custom folder
135+ certs . remove ( process . env . CERT_PATH )
136+ // restore the CERT_PATH to undefined
137+ delete process . env . CERT_PATH
138+ done ( )
139+ } ) ( )
140+ } )
141+
120142 it ( "provides the certificate" , function ( done ) {
121143 // inner async function
122144 ( async ( ) => {
You can’t perform that action at this time.
0 commit comments