Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
FUSETOOLS2-2311 - fix tests with VS Code 1.86+
Browse files Browse the repository at this point in the history
on Windows and Mac, the returned completion has a different structure in
some cases starting with VS Code 1.86+.

Signed-off-by: Aurélien Pupier <[email protected]>
  • Loading branch information
apupier committed May 6, 2024
1 parent 0097471 commit 8f592eb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/OtherOSes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [windows-latest, macos-latest]
version: ["1.85.2"] # [x.x.x | latest | max]
version: ["1.85.2", max] # [x.x.x | latest | max]
type: [stable] # [stable | insider]
fail-fast: false

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
version: ["1.85.2"] # [x.x.x | latest | max]
version: ["1.85.2", max] # [x.x.x | latest | max]
type: [stable] # [stable | insider]
fail-fast: false

Expand Down
3 changes: 2 additions & 1 deletion src/test/suite/completion.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export async function checkExpectedCompletion(docUri: vscode.Uri, position: vsco
const actualCompletionList = value as vscode.CompletionList;
lastCompletionList = actualCompletionList;
const completionItemFound = actualCompletionList.items.find(completion => {
return completion.label.toString() === expectedCompletion.label.toString()
return (completion.label.toString() === expectedCompletion.label.toString()
|| completion.label.toString() === (expectedCompletion.label as vscode.CompletionItemLabel).label)
&& completion.documentation === expectedCompletion.documentation
&& (expectedCompletion.insertText === undefined || completion.insertText === expectedCompletion.insertText);
});
Expand Down

0 comments on commit 8f592eb

Please sign in to comment.