From b6f83e03bf4fc779f117cf0427a1d4c447b97d29 Mon Sep 17 00:00:00 2001 From: Stephan Brandauer Date: Wed, 27 Nov 2024 13:54:57 +0000 Subject: [PATCH] update mocks --- .../local-queries/skeleton-query-wizard.test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/extensions/ql-vscode/test/vscode-tests/cli-integration/local-queries/skeleton-query-wizard.test.ts b/extensions/ql-vscode/test/vscode-tests/cli-integration/local-queries/skeleton-query-wizard.test.ts index 9076ec9bed4..d7936d3fdc1 100644 --- a/extensions/ql-vscode/test/vscode-tests/cli-integration/local-queries/skeleton-query-wizard.test.ts +++ b/extensions/ql-vscode/test/vscode-tests/cli-integration/local-queries/skeleton-query-wizard.test.ts @@ -36,9 +36,12 @@ import { createQueryTreeFolderItem, } from "../../../../src/queries-panel/query-tree-view-item"; import { dump } from "js-yaml"; +import type { LanguageClient } from "vscode-languageclient/node"; +import { mock } from "node:test"; describe("SkeletonQueryWizard", () => { let mockCli: CodeQLCliServer; + let mockLanguageClient: LanguageClient; let mockApp: App; let wizard: SkeletonQueryWizard; let mockDatabaseManager: DatabaseManager; @@ -88,6 +91,11 @@ describe("SkeletonQueryWizard", () => { ]), resolveQlpacks: resolveQlpacksMock, }); + + mockLanguageClient = mockedObject({ + sendNotification: jest.fn().mockResolvedValue([]), + }); + mockApp = createMockApp(); mockDatabaseManager = mockedObject({ @@ -142,6 +150,7 @@ describe("SkeletonQueryWizard", () => { wizard = new SkeletonQueryWizard( mockCli, + mockLanguageClient, jest.fn(), mockApp, mockDatabaseManager, @@ -165,6 +174,7 @@ describe("SkeletonQueryWizard", () => { beforeEach(() => { wizard = new SkeletonQueryWizard( mockCli, + mockLanguageClient, jest.fn(), mockApp, mockDatabaseManager, @@ -313,6 +323,7 @@ describe("SkeletonQueryWizard", () => { wizard = new SkeletonQueryWizard( mockCli, + mockLanguageClient, jest.fn(), mockApp, mockDatabaseManagerWithItems, @@ -362,6 +373,7 @@ describe("SkeletonQueryWizard", () => { wizard = new SkeletonQueryWizard( mockCli, + mockLanguageClient, jest.fn(), mockApp, mockDatabaseManagerWithItems, @@ -466,6 +478,7 @@ describe("SkeletonQueryWizard", () => { wizard = new SkeletonQueryWizard( mockCli, + mockLanguageClient, jest.fn(), mockApp, mockDatabaseManager, @@ -687,6 +700,7 @@ describe("SkeletonQueryWizard", () => { wizard = new SkeletonQueryWizard( mockCli, + mockLanguageClient, jest.fn(), mockApp, mockDatabaseManager, @@ -716,6 +730,7 @@ describe("SkeletonQueryWizard", () => { wizard = new SkeletonQueryWizard( mockCli, + mockLanguageClient, jest.fn(), mockApp, mockDatabaseManager, @@ -749,6 +764,7 @@ describe("SkeletonQueryWizard", () => { wizard = new SkeletonQueryWizard( mockCli, + mockLanguageClient, jest.fn(), mockApp, mockDatabaseManager, @@ -792,6 +808,7 @@ describe("SkeletonQueryWizard", () => { wizard = new SkeletonQueryWizard( mockCli, + mockLanguageClient, jest.fn(), mockApp, mockDatabaseManager,