@@ -111,17 +111,22 @@ suite('vscode API - commands', () => {
111
111
} ) ;
112
112
113
113
test ( 'api-command: vscode.open' , async function ( ) {
114
- const uri = Uri . parse ( workspace . workspaceFolders ! [ 0 ] . uri . toString ( ) + '/far.js' ) ;
114
+ assert . ok ( workspace . workspaceFolders ) ;
115
+ assert . ok ( workspace . workspaceFolders . length > 0 ) ;
116
+ const uri = Uri . parse ( workspace . workspaceFolders [ 0 ] . uri . toString ( ) + '/far.js' ) ;
115
117
116
118
await commands . executeCommand ( 'vscode.open' , uri ) ;
119
+ assert . strictEqual ( window . tabGroups . all . length , 1 ) ;
117
120
assert . strictEqual ( window . tabGroups . all [ 0 ] . activeTab ?. group . viewColumn , ViewColumn . One ) ;
118
121
assert . strictEqual ( window . activeTextEditor ?. viewColumn , ViewColumn . One ) ;
119
122
120
123
await commands . executeCommand ( 'vscode.open' , uri , ViewColumn . Two ) ;
124
+ assert . strictEqual ( window . tabGroups . all . length , 2 ) ;
121
125
assert . strictEqual ( window . tabGroups . all [ 1 ] . activeTab ?. group . viewColumn , ViewColumn . Two ) ;
122
126
assert . strictEqual ( window . activeTextEditor ?. viewColumn , ViewColumn . Two ) ;
123
127
124
128
await commands . executeCommand ( 'vscode.open' , uri , ViewColumn . One ) ;
129
+ assert . strictEqual ( window . tabGroups . all . length , 2 ) ;
125
130
assert . strictEqual ( window . tabGroups . all [ 0 ] . activeTab ?. group . viewColumn , ViewColumn . One ) ;
126
131
assert . strictEqual ( window . activeTextEditor ?. viewColumn , ViewColumn . One ) ;
127
132
0 commit comments