@@ -325,7 +325,7 @@ This is the prompt content.`;
325325
326326 describe ( 'setupMultipleEnvironments' , ( ) => {
327327 it ( 'should setup multiple environments successfully' , async ( ) => {
328- const envIds : EnvironmentCode [ ] = [ 'cursor' , 'gemini' ] ;
328+ const envCodes : EnvironmentCode [ ] = [ 'cursor' , 'gemini' ] ;
329329 const cursorEnv = {
330330 code : 'cursor' ,
331331 name : 'Cursor' ,
@@ -352,7 +352,7 @@ This is the prompt content.`;
352352
353353 ( templateManager as any ) . setupSingleEnvironment = mockSetupSingleEnvironment ;
354354
355- const result = await templateManager . setupMultipleEnvironments ( envIds ) ;
355+ const result = await templateManager . setupMultipleEnvironments ( envCodes ) ;
356356
357357 expect ( mockGetEnvironment ) . toHaveBeenCalledWith ( 'cursor' ) ;
358358 expect ( mockGetEnvironment ) . toHaveBeenCalledWith ( 'gemini' ) ;
@@ -366,7 +366,7 @@ This is the prompt content.`;
366366 } ) ;
367367
368368 it ( 'should skip invalid environments and continue with valid ones' , async ( ) => {
369- const envIds : EnvironmentCode [ ] = [ 'cursor' , 'invalid' as any , 'gemini' ] ;
369+ const envCodes : EnvironmentCode [ ] = [ 'cursor' , 'invalid' as any , 'gemini' ] ;
370370 const cursorEnv = {
371371 code : 'cursor' ,
372372 name : 'Cursor' ,
@@ -393,7 +393,7 @@ This is the prompt content.`;
393393
394394 ( templateManager as any ) . setupSingleEnvironment = mockSetupSingleEnvironment ;
395395
396- const result = await templateManager . setupMultipleEnvironments ( envIds ) ;
396+ const result = await templateManager . setupMultipleEnvironments ( envCodes ) ;
397397
398398 expect ( mockUi . warning ) . toHaveBeenCalledWith ( "Environment 'invalid' not found, skipping" ) ;
399399 expect ( result ) . toEqual ( [
@@ -403,7 +403,7 @@ This is the prompt content.`;
403403 } ) ;
404404
405405 it ( 'should throw error when setupSingleEnvironment fails' , async ( ) => {
406- const envIds : EnvironmentCode [ ] = [ 'cursor' ] ;
406+ const envCodes : EnvironmentCode [ ] = [ 'cursor' ] ;
407407 const cursorEnv = {
408408 code : 'cursor' ,
409409 name : 'Cursor' ,
@@ -416,26 +416,26 @@ This is the prompt content.`;
416416 const mockSetupSingleEnvironment = jest . fn ( ) . mockRejectedValue ( new Error ( 'Setup failed' ) ) ;
417417 ( templateManager as any ) . setupSingleEnvironment = mockSetupSingleEnvironment ;
418418
419- await expect ( templateManager . setupMultipleEnvironments ( envIds ) ) . rejects . toThrow ( 'Setup failed' ) ;
419+ await expect ( templateManager . setupMultipleEnvironments ( envCodes ) ) . rejects . toThrow ( 'Setup failed' ) ;
420420
421421 expect ( mockUi . error ) . toHaveBeenCalledWith ( "Error setting up environment 'Cursor': Setup failed" ) ;
422422 } ) ;
423423 } ) ;
424424
425425 describe ( 'checkEnvironmentExists' , ( ) => {
426426 it ( 'should return false when environment does not exist' , async ( ) => {
427- const envId : EnvironmentCode = 'cursor' ;
427+ const envCode : EnvironmentCode = 'cursor' ;
428428
429429 mockGetEnvironment . mockReturnValue ( undefined ) ;
430430
431- const result = await templateManager . checkEnvironmentExists ( envId ) ;
431+ const result = await templateManager . checkEnvironmentExists ( envCode ) ;
432432
433- expect ( mockGetEnvironment ) . toHaveBeenCalledWith ( envId ) ;
433+ expect ( mockGetEnvironment ) . toHaveBeenCalledWith ( envCode ) ;
434434 expect ( result ) . toBe ( false ) ;
435435 } ) ;
436436
437437 it ( 'should return false when only context file exists' , async ( ) => {
438- const envId : EnvironmentCode = 'cursor' ;
438+ const envCode : EnvironmentCode = 'cursor' ;
439439 const env = {
440440 code : 'cursor' ,
441441 name : 'Cursor' ,
@@ -447,7 +447,7 @@ This is the prompt content.`;
447447
448448 ( mockFs . pathExists as any ) . mockResolvedValueOnce ( false ) ; // command dir doesn't exist
449449
450- const result = await templateManager . checkEnvironmentExists ( envId ) ;
450+ const result = await templateManager . checkEnvironmentExists ( envCode ) ;
451451
452452 expect ( mockFs . pathExists ) . toHaveBeenCalledWith (
453453 path . join ( templateManager [ 'targetDir' ] , env . commandPath )
@@ -456,7 +456,7 @@ This is the prompt content.`;
456456 } ) ;
457457
458458 it ( 'should return true when command directory exists' , async ( ) => {
459- const envId : EnvironmentCode = 'cursor' ;
459+ const envCode : EnvironmentCode = 'cursor' ;
460460 const env = {
461461 code : 'cursor' ,
462462 name : 'Cursor' ,
@@ -468,13 +468,13 @@ This is the prompt content.`;
468468
469469 ( mockFs . pathExists as any ) . mockResolvedValueOnce ( true ) ; // command dir exists
470470
471- const result = await templateManager . checkEnvironmentExists ( envId ) ;
471+ const result = await templateManager . checkEnvironmentExists ( envCode ) ;
472472
473473 expect ( result ) . toBe ( true ) ;
474474 } ) ;
475475
476476 it ( 'should return false when command directory does not exist' , async ( ) => {
477- const envId : EnvironmentCode = 'cursor' ;
477+ const envCode : EnvironmentCode = 'cursor' ;
478478 const env = {
479479 code : 'cursor' ,
480480 name : 'Cursor' ,
@@ -486,7 +486,7 @@ This is the prompt content.`;
486486
487487 ( mockFs . pathExists as any ) . mockResolvedValueOnce ( false ) ; // command dir doesn't exist
488488
489- const result = await templateManager . checkEnvironmentExists ( envId ) ;
489+ const result = await templateManager . checkEnvironmentExists ( envCode ) ;
490490
491491 expect ( result ) . toBe ( false ) ;
492492 } ) ;
0 commit comments