File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,21 +45,19 @@ describe('Config test', function () {
4545 . to . throw ( / P l e a s e s p e c i f y C o d i M D s e r v e r U R L e i t h e r / )
4646 } )
4747
48- it ( 'should set enterprise to true if HMD_CLI_COOKIE_PATH is supplied' , function ( ) {
49- process . env . HMD_CLI_COOKIE_PATH = tempDir ( )
48+ it ( 'should set enterprise to true if HMD_CLI_COOKIE_PATH or HMD_CLI_SERVER_URL are supplied' , function ( ) {
5049 fs . writeFileSync ( this . configFilePath , '{}' , 'utf8' )
5150
52- const config = requireConfig ( )
51+ process . env . HMD_CLI_COOKIE_PATH = tempDir ( )
52+ let config = requireConfig ( )
5353
5454 expect ( config . cookiePath ) . to . eq ( process . env . HMD_CLI_COOKIE_PATH )
5555 expect ( config . enterprise ) . to . eq ( true )
56- } )
5756
58- it ( 'should set enterprise to true if HMD_CLI_SERVER_URL is supplied' , function ( ) {
59- process . env . HMD_CLI_SERVER_URL = tempDir ( )
60- fs . writeFileSync ( this . configFilePath , '{}' , 'utf8' )
57+ cleanup ( )
6158
62- const config = requireConfig ( )
59+ process . env . HMD_CLI_SERVER_URL = tempDir ( )
60+ config = requireConfig ( )
6361
6462 expect ( config . serverUrl ) . to . eq ( process . env . HMD_CLI_SERVER_URL )
6563 expect ( config . enterprise ) . to . eq ( true )
You can’t perform that action at this time.
0 commit comments