File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -639,4 +639,40 @@ describe('startInteractiveUI', () => {
639639 await new Promise ( ( resolve ) => setTimeout ( resolve , 0 ) ) ;
640640 expect ( checkForUpdates ) . toHaveBeenCalledTimes ( 1 ) ;
641641 } ) ;
642+
643+ it ( 'should not call checkForUpdates when disableUpdateNag is true' , async ( ) => {
644+ const { checkForUpdates } = await import ( './ui/utils/updateCheck.js' ) ;
645+
646+ const settingsWithNagDisabled = {
647+ merged : {
648+ general : {
649+ disableUpdateNag : true ,
650+ } ,
651+ ui : {
652+ hideWindowTitle : false ,
653+ } ,
654+ } ,
655+ } as LoadedSettings ;
656+
657+ const mockInitializationResult = {
658+ authError : null ,
659+ themeError : null ,
660+ shouldOpenAuthDialog : false ,
661+ geminiMdFileCount : 0 ,
662+ } ;
663+
664+ await startInteractiveUI (
665+ mockConfig ,
666+ settingsWithNagDisabled ,
667+ mockStartupWarnings ,
668+ mockWorkspaceRoot ,
669+ mockInitializationResult ,
670+ ) ;
671+
672+ // Wait for any async operations
673+ await new Promise ( ( resolve ) => setTimeout ( resolve , 0 ) ) ;
674+
675+ // checkForUpdates should NOT be called when disableUpdateNag is true
676+ expect ( checkForUpdates ) . not . toHaveBeenCalled ( ) ;
677+ } ) ;
642678} ) ;
You can’t perform that action at this time.
0 commit comments