Skip to content

Commit ea150fc

Browse files
committed
update integration test based on latest behavior
1 parent e50ac97 commit ea150fc

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

vscode/test/suites/language-service/language-service.test.ts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ suite("Q# Language Service Tests", function suite() {
1616

1717
const testQs = joinPath(workspaceFolderUri, "test.qs");
1818
const noErrorsQs = joinPath(workspaceFolderUri, "no-errors.qs");
19-
const emptyQs = joinPath(workspaceFolderUri, "empty.qs");
2019
const mainPackageMainQs = joinPath(packages, "MainPackage", "src", "Main.qs");
2120
const depPackageMainQs = joinPath(packages, "DepPackage", "src", "Main.qs");
2221
const missingDepMainQs = joinPath(packages, "MissingDep", "src", "Main.qs");
@@ -46,7 +45,6 @@ suite("Q# Language Service Tests", function suite() {
4645
// before we start testing.
4746
await vscode.workspace.openTextDocument(testQs);
4847
await vscode.workspace.openTextDocument(noErrorsQs);
49-
await vscode.workspace.openTextDocument(emptyQs);
5048
await vscode.workspace.openTextDocument(mainPackageMainQs);
5149
await vscode.workspace.openTextDocument(depPackageMainQs);
5250
await vscode.workspace.openTextDocument(missingDepMainQs);
@@ -81,21 +79,16 @@ suite("Q# Language Service Tests", function suite() {
8179
actualCompletionList.items.map((i) => i.label),
8280
"operation",
8381
);
84-
85-
assert.notInclude(
86-
actualCompletionList.items.map((i) => i.label),
87-
"Shor sample",
88-
);
8982
});
9083

91-
test("Completions - include samples in empty document", async () => {
84+
test("Completions - don't include samples when syntactically inappropriate", async () => {
9285
const actualCompletionList = (await vscode.commands.executeCommand(
9386
"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
9689
)) as vscode.CompletionList;
9790

98-
assert.include(
91+
assert.notInclude(
9992
actualCompletionList.items.map((i) => i.label),
10093
"Shor sample",
10194
);

vscode/test/suites/language-service/test-workspace/empty.qs

Whitespace-only changes.

0 commit comments

Comments
 (0)