Skip to content

Commit 8fd9ebf

Browse files
committed
Limit comparison to Uri path
We attempted to specify exactly which URI we're expecting here. However, `Uri.parse` behaves differently in the test than it does in the code so we've inadvertently created a flakey test [1]. The URI we generate in the test has a `scheme: 'c'` while the one in the code has a `scheme: 'C'` property. This only happens on windows, not ubuntu. Let's narrow the comparison to just the path of the URI. [1]: https://github.com/github/vscode-codeql/actions/runs/4478429334/jobs/7871178529#step:7:231
1 parent 108943d commit 8fd9ebf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extensions/ql-vscode/test/vscode-tests/no-workspace/helpers.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,9 @@ describe("prepareCodeTour", () => {
620620
expect(showInformationMessageSpy).toHaveBeenCalled();
621621
expect(commandSpy).toHaveBeenCalledWith(
622622
"vscode.openFolder",
623-
Uri.parse(tutorialWorkspacePath),
623+
expect.objectContaining({
624+
path: Uri.parse(tutorialWorkspacePath).fsPath,
625+
}),
624626
);
625627
});
626628
});

0 commit comments

Comments
 (0)