Skip to content

Commit 2d5c339

Browse files
committed
Add check for error message for packaging.test.ts
This will add a check to ensure that `showAndLogExceptionWithTelemetry` is not called when downloading packs. This expectation is placed before the check for `showAndLogInformationMessage` so that when the test fails, the error message will be shown.
1 parent 56111b3 commit 2d5c339

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

extensions/ql-vscode/test/vscode-tests/cli-integration/packaging.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ describe("Packaging commands", () => {
6161
);
6262

6363
await handleDownloadPacks(cli, progress);
64+
expect(showAndLogExceptionWithTelemetrySpy).not.toHaveBeenCalled();
6465
expect(showAndLogInformationMessageSpy).toHaveBeenCalledWith(
6566
expect.stringContaining("Finished downloading packs."),
6667
);
@@ -73,6 +74,7 @@ describe("Packaging commands", () => {
7374
inputBoxSpy.mockResolvedValue("codeql/csharp-solorigate-queries");
7475

7576
await handleDownloadPacks(cli, progress);
77+
expect(showAndLogExceptionWithTelemetrySpy).not.toHaveBeenCalled();
7678
expect(showAndLogInformationMessageSpy).toHaveBeenCalledWith(
7779
expect.stringContaining("Finished downloading packs."),
7880
);

0 commit comments

Comments
 (0)