@@ -16,6 +16,12 @@ const mockWatcher = {
1616}
1717
1818jest . mock ( "vscode" , ( ) => ( {
19+ window : {
20+ tabGroups : {
21+ onDidChangeTabs : jest . fn ( ( ) => ( { dispose : jest . fn ( ) } ) ) ,
22+ all : [ ] ,
23+ } ,
24+ } ,
1925 workspace : {
2026 workspaceFolders : [
2127 {
@@ -61,6 +67,7 @@ describe("WorkspaceTracker", () => {
6167 expect ( mockProvider . postMessageToWebview ) . toHaveBeenCalledWith ( {
6268 type : "workspaceUpdated" ,
6369 filePaths : expect . arrayContaining ( [ "file1.ts" , "file2.ts" ] ) ,
70+ openedTabs : [ ] ,
6471 } )
6572 expect ( ( mockProvider . postMessageToWebview as jest . Mock ) . mock . calls [ 0 ] [ 0 ] . filePaths ) . toHaveLength ( 2 )
6673 } )
@@ -74,6 +81,7 @@ describe("WorkspaceTracker", () => {
7481 expect ( mockProvider . postMessageToWebview ) . toHaveBeenCalledWith ( {
7582 type : "workspaceUpdated" ,
7683 filePaths : [ "newfile.ts" ] ,
84+ openedTabs : [ ] ,
7785 } )
7886 } )
7987
@@ -92,6 +100,7 @@ describe("WorkspaceTracker", () => {
92100 expect ( mockProvider . postMessageToWebview ) . toHaveBeenLastCalledWith ( {
93101 type : "workspaceUpdated" ,
94102 filePaths : [ ] ,
103+ openedTabs : [ ] ,
95104 } )
96105 } )
97106
@@ -106,6 +115,7 @@ describe("WorkspaceTracker", () => {
106115 expect ( mockProvider . postMessageToWebview ) . toHaveBeenCalledWith ( {
107116 type : "workspaceUpdated" ,
108117 filePaths : expect . arrayContaining ( [ "newdir" ] ) ,
118+ openedTabs : [ ] ,
109119 } )
110120 const lastCall = ( mockProvider . postMessageToWebview as jest . Mock ) . mock . calls . slice ( - 1 ) [ 0 ]
111121 expect ( lastCall [ 0 ] . filePaths ) . toHaveLength ( 1 )
@@ -126,6 +136,7 @@ describe("WorkspaceTracker", () => {
126136 expect ( mockProvider . postMessageToWebview ) . toHaveBeenCalledWith ( {
127137 type : "workspaceUpdated" ,
128138 filePaths : expect . arrayContaining ( expectedFiles ) ,
139+ openedTabs : [ ] ,
129140 } )
130141 expect ( calls [ 0 ] [ 0 ] . filePaths ) . toHaveLength ( 1000 )
131142
0 commit comments