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:
@@ -620,7 +620,9 @@ describe("prepareCodeTour", () => {
|
||||
expect(showInformationMessageSpy).toHaveBeenCalled();
|
||||
expect(commandSpy).toHaveBeenCalledWith(
|
||||
"vscode.openFolder",
|
||||
Uri.parse(tutorialWorkspacePath),
|
||||
expect.objectContaining({
|
||||
path: Uri.parse(tutorialWorkspacePath).fsPath,
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user