File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -45,21 +45,19 @@ describe('Config test', function () {
45
45
. 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 / )
46
46
} )
47
47
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 ( ) {
50
49
fs . writeFileSync ( this . configFilePath , '{}' , 'utf8' )
51
50
52
- const config = requireConfig ( )
51
+ process . env . HMD_CLI_COOKIE_PATH = tempDir ( )
52
+ let config = requireConfig ( )
53
53
54
54
expect ( config . cookiePath ) . to . eq ( process . env . HMD_CLI_COOKIE_PATH )
55
55
expect ( config . enterprise ) . to . eq ( true )
56
- } )
57
56
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 ( )
61
58
62
- const config = requireConfig ( )
59
+ process . env . HMD_CLI_SERVER_URL = tempDir ( )
60
+ config = requireConfig ( )
63
61
64
62
expect ( config . serverUrl ) . to . eq ( process . env . HMD_CLI_SERVER_URL )
65
63
expect ( config . enterprise ) . to . eq ( true )
You can’t perform that action at this time.
0 commit comments