@@ -44,6 +44,7 @@ suite('Autocomplete', () => {
4444 textDocument = document ;
4545 return vscode . window . showTextDocument ( textDocument ) ;
4646 } ) . then ( editor => {
47+ assert ( vscode . window . activeTextEditor , 'No active editor' ) ;
4748 textEditor = editor ;
4849 const position = new vscode . Position ( 3 , 10 ) ;
4950 return vscode . commands . executeCommand ( 'vscode.executeCompletionItemProvider' , textDocument . uri , position ) ;
@@ -61,6 +62,7 @@ suite('Autocomplete', () => {
6162 textDocument = document ;
6263 return vscode . window . showTextDocument ( textDocument ) ;
6364 } ) . then ( editor => {
65+ assert ( vscode . window . activeTextEditor , 'No active editor' ) ;
6466 textEditor = editor ;
6567 const position = new vscode . Position ( 30 , 4 ) ;
6668 return vscode . commands . executeCommand ( 'vscode.executeCompletionItemProvider' , textDocument . uri , position ) ;
@@ -77,6 +79,7 @@ suite('Autocomplete', () => {
7779 textDocument = document ;
7880 return vscode . window . showTextDocument ( textDocument ) ;
7981 } ) . then ( editor => {
82+ assert ( vscode . window . activeTextEditor , 'No active editor' ) ;
8083 textEditor = editor ;
8184 const position = new vscode . Position ( 25 , 4 ) ;
8285 return vscode . commands . executeCommand ( 'vscode.executeCompletionItemProvider' , textDocument . uri , position ) ;
@@ -94,6 +97,7 @@ suite('Autocomplete', () => {
9497 textDocument = document ;
9598 return vscode . window . showTextDocument ( textDocument ) ;
9699 } ) . then ( editor => {
100+ assert ( vscode . window . activeTextEditor , 'No active editor' ) ;
97101 textEditor = editor ;
98102 const position = new vscode . Position ( 1 , 5 ) ;
99103 return vscode . commands . executeCommand ( 'vscode.executeCompletionItemProvider' , textDocument . uri , position ) ;
@@ -130,6 +134,7 @@ suite('Code Definition', () => {
130134 textDocument = document ;
131135 return vscode . window . showTextDocument ( textDocument ) ;
132136 } ) . then ( editor => {
137+ assert ( vscode . window . activeTextEditor , 'No active editor' ) ;
133138 textEditor = editor ;
134139 const position = new vscode . Position ( 30 , 5 ) ;
135140 return vscode . commands . executeCommand ( 'vscode.executeDefinitionProvider' , textDocument . uri , position ) ;
@@ -147,6 +152,7 @@ suite('Code Definition', () => {
147152 textDocument = document ;
148153 return vscode . window . showTextDocument ( textDocument ) ;
149154 } ) . then ( editor => {
155+ assert ( vscode . window . activeTextEditor , 'No active editor' ) ;
150156 textEditor = editor ;
151157 const position = new vscode . Position ( 1 , 5 ) ;
152158 return vscode . commands . executeCommand ( 'vscode.executeDefinitionProvider' , textDocument . uri , position ) ;
@@ -165,6 +171,7 @@ suite('Code Definition', () => {
165171 textDocument = document ;
166172 return vscode . window . showTextDocument ( textDocument ) ;
167173 } ) . then ( editor => {
174+ assert ( vscode . window . activeTextEditor , 'No active editor' ) ;
168175 textEditor = editor ;
169176 const position = new vscode . Position ( 25 , 6 ) ;
170177 return vscode . commands . executeCommand ( 'vscode.executeDefinitionProvider' , textDocument . uri , position ) ;
@@ -183,6 +190,7 @@ suite('Code Definition', () => {
183190 textDocument = document ;
184191 return vscode . window . showTextDocument ( textDocument ) ;
185192 } ) . then ( editor => {
193+ assert ( vscode . window . activeTextEditor , 'No active editor' ) ;
186194 textEditor = editor ;
187195 const position = new vscode . Position ( 1 , 11 ) ;
188196 return vscode . commands . executeCommand ( 'vscode.executeDefinitionProvider' , textDocument . uri , position ) ;
@@ -217,6 +225,7 @@ suite('Hover Definition', () => {
217225 textDocument = document ;
218226 return vscode . window . showTextDocument ( textDocument ) ;
219227 } ) . then ( editor => {
228+ assert ( vscode . window . activeTextEditor , 'No active editor' ) ;
220229 textEditor = editor ;
221230 const position = new vscode . Position ( 30 , 5 ) ;
222231 return vscode . commands . executeCommand ( 'vscode.executeHoverProvider' , textDocument . uri , position ) ;
@@ -236,6 +245,7 @@ suite('Hover Definition', () => {
236245 textDocument = document ;
237246 return vscode . window . showTextDocument ( textDocument ) ;
238247 } ) . then ( editor => {
248+ assert ( vscode . window . activeTextEditor , 'No active editor' ) ;
239249 textEditor = editor ;
240250 const position = new vscode . Position ( 1 , 12 ) ;
241251 return vscode . commands . executeCommand ( 'vscode.executeHoverProvider' , textDocument . uri , position ) ;
@@ -255,6 +265,7 @@ suite('Hover Definition', () => {
255265 textDocument = document ;
256266 return vscode . window . showTextDocument ( textDocument ) ;
257267 } ) . then ( editor => {
268+ assert ( vscode . window . activeTextEditor , 'No active editor' ) ;
258269 textEditor = editor ;
259270 const position = new vscode . Position ( 25 , 6 ) ;
260271 return vscode . commands . executeCommand ( 'vscode.executeHoverProvider' , textDocument . uri , position ) ;
@@ -275,6 +286,7 @@ suite('Hover Definition', () => {
275286 textDocument = document ;
276287 return vscode . window . showTextDocument ( textDocument ) ;
277288 } ) . then ( editor => {
289+ assert ( vscode . window . activeTextEditor , 'No active editor' ) ;
278290 textEditor = editor ;
279291 const position = new vscode . Position ( 1 , 11 ) ;
280292 return vscode . commands . executeCommand ( 'vscode.executeHoverProvider' , textDocument . uri , position ) ;
0 commit comments