@@ -16,7 +16,6 @@ suite("Q# Language Service Tests", function suite() {
16
16
17
17
const testQs = joinPath ( workspaceFolderUri , "test.qs" ) ;
18
18
const noErrorsQs = joinPath ( workspaceFolderUri , "no-errors.qs" ) ;
19
- const emptyQs = joinPath ( workspaceFolderUri , "empty.qs" ) ;
20
19
const mainPackageMainQs = joinPath ( packages , "MainPackage" , "src" , "Main.qs" ) ;
21
20
const depPackageMainQs = joinPath ( packages , "DepPackage" , "src" , "Main.qs" ) ;
22
21
const missingDepMainQs = joinPath ( packages , "MissingDep" , "src" , "Main.qs" ) ;
@@ -46,7 +45,6 @@ suite("Q# Language Service Tests", function suite() {
46
45
// before we start testing.
47
46
await vscode . workspace . openTextDocument ( testQs ) ;
48
47
await vscode . workspace . openTextDocument ( noErrorsQs ) ;
49
- await vscode . workspace . openTextDocument ( emptyQs ) ;
50
48
await vscode . workspace . openTextDocument ( mainPackageMainQs ) ;
51
49
await vscode . workspace . openTextDocument ( depPackageMainQs ) ;
52
50
await vscode . workspace . openTextDocument ( missingDepMainQs ) ;
@@ -81,21 +79,16 @@ suite("Q# Language Service Tests", function suite() {
81
79
actualCompletionList . items . map ( ( i ) => i . label ) ,
82
80
"operation" ,
83
81
) ;
84
-
85
- assert . notInclude (
86
- actualCompletionList . items . map ( ( i ) => i . label ) ,
87
- "Shor sample" ,
88
- ) ;
89
82
} ) ;
90
83
91
- test ( "Completions - include samples in empty document " , async ( ) => {
84
+ test ( "Completions - don't include samples when syntactically inappropriate " , async ( ) => {
92
85
const actualCompletionList = ( await vscode . commands . executeCommand (
93
86
"vscode.executeCompletionItemProvider" ,
94
- emptyQs ,
95
- new vscode . Position ( 1 , 0 ) ,
87
+ testQs ,
88
+ new vscode . Position ( 12 , 0 ) , // put the cursor after the namespace declaration
96
89
) ) as vscode . CompletionList ;
97
90
98
- assert . include (
91
+ assert . notInclude (
99
92
actualCompletionList . items . map ( ( i ) => i . label ) ,
100
93
"Shor sample" ,
101
94
) ;
0 commit comments