@@ -238,8 +238,12 @@ suite('DeepnoteExplorerView - Empty State Commands', () => {
238238
239239 // Mock notebook opening
240240 const mockNotebook = { notebookType : 'deepnote' } ;
241- when ( mockedVSCodeNamespaces . workspace . openNotebookDocument ( anything ( ) ) ) . thenReturn ( Promise . resolve ( mockNotebook as any ) ) ;
242- when ( mockedVSCodeNamespaces . window . showNotebookDocument ( anything ( ) , anything ( ) ) ) . thenReturn ( Promise . resolve ( undefined as any ) ) ;
241+ when ( mockedVSCodeNamespaces . workspace . openNotebookDocument ( anything ( ) ) ) . thenReturn (
242+ Promise . resolve ( mockNotebook as any )
243+ ) ;
244+ when ( mockedVSCodeNamespaces . window . showNotebookDocument ( anything ( ) , anything ( ) ) ) . thenReturn (
245+ Promise . resolve ( undefined as any )
246+ ) ;
243247
244248 // Execute command - capture writeFile call
245249 let capturedUri : Uri | undefined ;
@@ -288,8 +292,12 @@ suite('DeepnoteExplorerView - Empty State Commands', () => {
288292 } ) ;
289293 when ( mockedVSCodeNamespaces . workspace . fs ) . thenReturn ( instance ( mockFS ) ) ;
290294
291- when ( mockedVSCodeNamespaces . workspace . openNotebookDocument ( anything ( ) ) ) . thenReturn ( Promise . resolve ( { } as any ) ) ;
292- when ( mockedVSCodeNamespaces . window . showNotebookDocument ( anything ( ) , anything ( ) ) ) . thenReturn ( Promise . resolve ( undefined as any ) ) ;
295+ when ( mockedVSCodeNamespaces . workspace . openNotebookDocument ( anything ( ) ) ) . thenReturn (
296+ Promise . resolve ( { } as any )
297+ ) ;
298+ when ( mockedVSCodeNamespaces . window . showNotebookDocument ( anything ( ) , anything ( ) ) ) . thenReturn (
299+ Promise . resolve ( undefined as any )
300+ ) ;
293301
294302 await ( explorerView as any ) . newProject ( ) ;
295303
@@ -302,10 +310,12 @@ suite('DeepnoteExplorerView - Empty State Commands', () => {
302310
303311 let showInfoCalled = false ;
304312 let executeCommandCalled = false ;
305- when ( mockedVSCodeNamespaces . window . showInformationMessage ( anything ( ) , anything ( ) , anything ( ) ) ) . thenCall ( ( ) => {
306- showInfoCalled = true ;
307- return Promise . resolve ( 'Open Folder' ) ;
308- } ) ;
313+ when ( mockedVSCodeNamespaces . window . showInformationMessage ( anything ( ) , anything ( ) , anything ( ) ) ) . thenCall (
314+ ( ) => {
315+ showInfoCalled = true ;
316+ return Promise . resolve ( 'Open Folder' ) ;
317+ }
318+ ) ;
309319 when ( mockedVSCodeNamespaces . commands . executeCommand ( anything ( ) ) ) . thenCall ( ( cmd : string ) => {
310320 if ( cmd === 'vscode.openFolder' ) {
311321 executeCommandCalled = true ;
@@ -421,7 +431,9 @@ suite('DeepnoteExplorerView - Empty State Commands', () => {
421431 return Promise . resolve ( ) ;
422432 } ) ;
423433 when ( mockedVSCodeNamespaces . workspace . fs ) . thenReturn ( instance ( mockFS ) ) ;
424- when ( mockedVSCodeNamespaces . window . showInformationMessage ( anything ( ) ) ) . thenReturn ( Promise . resolve ( undefined ) ) ;
434+ when ( mockedVSCodeNamespaces . window . showInformationMessage ( anything ( ) ) ) . thenReturn (
435+ Promise . resolve ( undefined )
436+ ) ;
425437
426438 await ( explorerView as any ) . importNotebook ( ) ;
427439
@@ -458,7 +470,9 @@ suite('DeepnoteExplorerView - Empty State Commands', () => {
458470 const jupyterUri = Uri . file ( '/external/test2.ipynb' ) ;
459471
460472 when ( mockedVSCodeNamespaces . workspace . workspaceFolders ) . thenReturn ( [ workspaceFolder as any ] ) ;
461- when ( mockedVSCodeNamespaces . window . showOpenDialog ( anything ( ) ) ) . thenReturn ( Promise . resolve ( [ deepnoteUri , jupyterUri ] ) ) ;
473+ when ( mockedVSCodeNamespaces . window . showOpenDialog ( anything ( ) ) ) . thenReturn (
474+ Promise . resolve ( [ deepnoteUri , jupyterUri ] )
475+ ) ;
462476
463477 const mockFS = mock < typeof workspace . fs > ( ) ;
464478 when ( mockFS . stat ( anything ( ) ) ) . thenReject ( new Error ( 'File not found' ) ) ;
@@ -548,10 +562,12 @@ suite('DeepnoteExplorerView - Empty State Commands', () => {
548562
549563 let showInfoCalled = false ;
550564 let executeCommandCalled = false ;
551- when ( mockedVSCodeNamespaces . window . showInformationMessage ( anything ( ) , anything ( ) , anything ( ) ) ) . thenCall ( ( ) => {
552- showInfoCalled = true ;
553- return Promise . resolve ( 'Open Folder' ) ;
554- } ) ;
565+ when ( mockedVSCodeNamespaces . window . showInformationMessage ( anything ( ) , anything ( ) , anything ( ) ) ) . thenCall (
566+ ( ) => {
567+ showInfoCalled = true ;
568+ return Promise . resolve ( 'Open Folder' ) ;
569+ }
570+ ) ;
555571 when ( mockedVSCodeNamespaces . commands . executeCommand ( anything ( ) ) ) . thenCall ( ( cmd : string ) => {
556572 if ( cmd === 'vscode.openFolder' ) {
557573 executeCommandCalled = true ;
@@ -675,10 +691,12 @@ suite('DeepnoteExplorerView - Empty State Commands', () => {
675691
676692 let showInfoCalled = false ;
677693 let executeCommandCalled = false ;
678- when ( mockedVSCodeNamespaces . window . showInformationMessage ( anything ( ) , anything ( ) , anything ( ) ) ) . thenCall ( ( ) => {
679- showInfoCalled = true ;
680- return Promise . resolve ( 'Open Folder' ) ;
681- } ) ;
694+ when ( mockedVSCodeNamespaces . window . showInformationMessage ( anything ( ) , anything ( ) , anything ( ) ) ) . thenCall (
695+ ( ) => {
696+ showInfoCalled = true ;
697+ return Promise . resolve ( 'Open Folder' ) ;
698+ }
699+ ) ;
682700 when ( mockedVSCodeNamespaces . commands . executeCommand ( anything ( ) ) ) . thenCall ( ( cmd : string ) => {
683701 if ( cmd === 'vscode.openFolder' ) {
684702 executeCommandCalled = true ;
0 commit comments