@@ -692,36 +692,6 @@ describe("CustomModesManager", () => {
692692
693693 expect ( fs . writeFile ) . toHaveBeenCalledWith ( settingsPath , expect . stringMatching ( / ^ c u s t o m M o d e s : \[ \] / ) )
694694 } )
695-
696- it ( "watches file for changes" , async ( ) => {
697- const configPath = path . join ( mockStoragePath , "settings" , GlobalFileNames . customModes )
698-
699- ; ( fs . readFile as jest . Mock ) . mockResolvedValue ( yaml . stringify ( { customModes : [ ] } ) )
700- ; ( arePathsEqual as jest . Mock ) . mockImplementation ( ( path1 : string , path2 : string ) => {
701- return path . normalize ( path1 ) === path . normalize ( path2 )
702- } )
703-
704- // Verify that createFileSystemWatcher was called
705- expect ( vscode . workspace . createFileSystemWatcher ) . toHaveBeenCalled ( )
706-
707- // Get the watcher that was created
708- const watcher = vscode . workspace . createFileSystemWatcher . mock . results [ 0 ] . value
709-
710- // Verify that onDidChange was called to register a callback
711- expect ( watcher . onDidChange ) . toHaveBeenCalled ( )
712-
713- // Get the callback that was registered
714- const changeCallback = watcher . onDidChange . mock . calls [ 0 ] [ 0 ]
715- expect ( changeCallback ) . toBeDefined ( )
716-
717- // Simulate file change event by calling the callback directly
718- await changeCallback ( )
719-
720- // Verify file was processed
721- expect ( fs . readFile ) . toHaveBeenCalledWith ( configPath , "utf-8" )
722- expect ( mockContext . globalState . update ) . toHaveBeenCalled ( )
723- expect ( mockOnUpdate ) . toHaveBeenCalled ( )
724- } )
725695 } )
726696
727697 describe ( "deleteCustomMode" , ( ) => {
0 commit comments