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
This commit is contained in:
Elena Tanasoiu
2023-03-21 13:46:28 +00:00
parent 108943d135
commit 8fd9ebf2d8

View File

@@ -620,7 +620,9 @@ describe("prepareCodeTour", () => {
expect(showInformationMessageSpy).toHaveBeenCalled();
expect(commandSpy).toHaveBeenCalledWith(
"vscode.openFolder",
Uri.parse(tutorialWorkspacePath),
expect.objectContaining({
path: Uri.parse(tutorialWorkspacePath).fsPath,
}),
);
});
});