@@ -48,25 +48,22 @@ suite('WindowsFinder', () => {
4848 } ) ) , null ) ;
4949 assert . equal ( findBestWindowOrFolderForFile ( options ( {
5050 filePath : path . join ( fixturesFolder , 'vscode_folder' , 'file.txt' ) ,
51- newWindow : true // We assume this implies 'editor' work mode, might need separate CLI option later.
51+ newWindow : true
5252 } ) ) , null ) ;
5353 assert . equal ( findBestWindowOrFolderForFile ( options ( {
5454 filePath : path . join ( fixturesFolder , 'vscode_folder' , 'file.txt' ) ,
55- reuseWindow : true // We assume this implies 'editor' work mode, might need separate CLI option later.
55+ reuseWindow : true
5656 } ) ) , null ) ;
5757 assert . equal ( findBestWindowOrFolderForFile ( options ( {
5858 filePath : path . join ( fixturesFolder , 'vscode_folder' , 'file.txt' ) ,
5959 context : OpenContext . API
6060 } ) ) , null ) ;
61- } ) ;
62-
63- test ( 'New window with folder when no windows exist' , ( ) => {
6461 assert . equal ( findBestWindowOrFolderForFile ( options ( {
6562 filePath : path . join ( fixturesFolder , 'vscode_folder' , 'file.txt' )
66- } ) ) , path . join ( fixturesFolder , 'vscode_folder' ) ) ;
63+ } ) ) , null ) ;
6764 assert . equal ( findBestWindowOrFolderForFile ( options ( {
6865 filePath : path . join ( fixturesFolder , 'vscode_folder' , 'new_folder' , 'new_file.txt' )
69- } ) ) , path . join ( fixturesFolder , 'vscode_folder' ) ) ;
66+ } ) ) , null ) ;
7067 } ) ;
7168
7269 test ( 'New window without folder when windows exist' , ( ) => {
@@ -106,19 +103,11 @@ suite('WindowsFinder', () => {
106103 windows,
107104 filePath : path . join ( fixturesFolder , 'vscode_folder' , 'file.txt' )
108105 } ) ) , vscodeFolderWindow ) ;
109- } ) ;
110-
111- test ( 'Existing window wins over vscode folder if more specific' , ( ) => {
112106 const window = { lastFocusTime : 1 , openedFolderPath : path . join ( fixturesFolder , 'vscode_folder' , 'nested_folder' ) } ;
113107 assert . equal ( findBestWindowOrFolderForFile ( options ( {
114108 windows : [ window ] ,
115109 filePath : path . join ( fixturesFolder , 'vscode_folder' , 'nested_folder' , 'subfolder' , 'file.txt' )
116110 } ) ) , window ) ;
117- // check
118- assert . equal ( findBestWindowOrFolderForFile ( options ( {
119- windows : [ window ] ,
120- filePath : path . join ( fixturesFolder , 'vscode_folder' , 'nested_folder2' , 'subfolder' , 'file.txt' )
121- } ) ) , path . join ( fixturesFolder , 'vscode_folder' ) ) ;
122111 } ) ;
123112
124113 test ( 'More specific existing window wins' , ( ) => {
@@ -130,25 +119,6 @@ suite('WindowsFinder', () => {
130119 } ) ) , nestedFolderWindow ) ;
131120 } ) ;
132121
133- test ( 'VSCode folder wins over existing window if more specific' , ( ) => {
134- const window = { lastFocusTime : 1 , openedFolderPath : path . join ( fixturesFolder , 'vscode_folder' ) } ;
135- assert . equal ( findBestWindowOrFolderForFile ( options ( {
136- windows : [ window ] ,
137- filePath : path . join ( fixturesFolder , 'vscode_folder' , 'nested_vscode_folder' , 'subfolder' , 'file.txt' )
138- } ) ) , path . join ( fixturesFolder , 'vscode_folder' , 'nested_vscode_folder' ) ) ;
139- // check
140- assert . equal ( findBestWindowOrFolderForFile ( options ( {
141- windows : [ window ] ,
142- filePath : path . join ( fixturesFolder , 'vscode_folder' , 'nested_folder' , 'subfolder' , 'file.txt' )
143- } ) ) , window ) ;
144- } ) ;
145-
146- test ( 'More specific VSCode folder wins' , ( ) => {
147- assert . equal ( findBestWindowOrFolderForFile ( options ( {
148- filePath : path . join ( fixturesFolder , 'vscode_folder' , 'nested_vscode_folder' , 'subfolder' , 'file.txt' )
149- } ) ) , path . join ( fixturesFolder , 'vscode_folder' , 'nested_vscode_folder' ) ) ;
150- } ) ;
151-
152122 test ( 'Workspace folder wins' , ( ) => {
153123 const window = { lastFocusTime : 1 , openedWorkspace : testWorkspace } ;
154124 assert . equal ( findBestWindowOrFolderForFile ( options ( {
0 commit comments