@@ -43,7 +43,6 @@ public void CtrlSpace() {
4343 var server = solution . OpenItem ( "CtrlSpace" , "server.js" ) ;
4444
4545 server . MoveCaret ( 2 , 13 ) ;
46-
4746 solution . ExecuteCommand ( "Edit.CompleteWord" ) ;
4847
4948 server . WaitForText ( "var http = require('http');\r \n http.createServer" ) ;
@@ -268,6 +267,37 @@ public void IntellisenseAfterMultiLineComment() {
268267 }
269268 }
270269
270+ /// <summary>
271+ /// https://github.com/Microsoft/nodejstools/issues/454
272+ /// </summary>
273+ [ TestMethod , Priority ( 0 ) , TestCategory ( "Core" ) ]
274+ [ HostType ( "VSTestHost" ) ]
275+ public void IntellisenseAfterVarKeyword ( ) {
276+ var project = Project ( "IntellisenseAfterVarKeywordTest" ,
277+ Compile ( "server" , "var c \r \n exports.var = 3; exports.var " )
278+ ) ;
279+
280+ using ( var solution = project . Generate ( ) . ToVs ( ) ) {
281+ var server = solution . OpenItem ( "IntellisenseAfterVarKeywordTest" , "server.js" ) ;
282+
283+ server . MoveCaret ( 1 , 4 ) ;
284+ Keyboard . Type ( Keyboard . CtrlSpace . ToString ( ) ) ;
285+ using ( var sh = server . WaitForSession < ICompletionSession > ( true ) ) { }
286+
287+ server . MoveCaret ( 1 , 6 ) ;
288+ Keyboard . Type ( Keyboard . CtrlSpace . ToString ( ) ) ;
289+ server . AssertNoIntellisenseSession ( ) ;
290+
291+ server . MoveCaret ( 1 , 7 ) ;
292+ Keyboard . Type ( Keyboard . CtrlSpace . ToString ( ) ) ;
293+ using ( var sh = server . WaitForSession < ICompletionSession > ( true ) ) { }
294+
295+ server . MoveCaret ( 2 , 30 ) ;
296+ Keyboard . Type ( Keyboard . CtrlSpace . ToString ( ) ) ;
297+ using ( var sh = server . WaitForSession < ICompletionSession > ( true ) ) { }
298+ }
299+ }
300+
271301 [ TestMethod , Priority ( 0 ) , TestCategory ( "Core" ) ]
272302 [ HostType ( "VSTestHost" ) ]
273303 public void JSDocTest ( ) {
0 commit comments