Skip to content

Commit

Permalink
update mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
kaeluka committed Nov 27, 2024
1 parent ddf4df4 commit 656363b
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ import {
createQueryTreeFolderItem,
} from "../../../../src/queries-panel/query-tree-view-item";
import { dump } from "js-yaml";
import type { LanguageClient } from "vscode-languageclient/node";

describe("SkeletonQueryWizard", () => {
let mockCli: CodeQLCliServer;
let mockLanguageClient: LanguageClient;
let mockApp: App;
let wizard: SkeletonQueryWizard;
let mockDatabaseManager: DatabaseManager;
Expand Down Expand Up @@ -88,6 +90,11 @@ describe("SkeletonQueryWizard", () => {
]),
resolveQlpacks: resolveQlpacksMock,
});

mockLanguageClient = mockedObject<LanguageClient>({
sendNotification: jest.fn().mockResolvedValue([]),
});

mockApp = createMockApp();

mockDatabaseManager = mockedObject<DatabaseManager>({
Expand Down Expand Up @@ -142,6 +149,7 @@ describe("SkeletonQueryWizard", () => {

wizard = new SkeletonQueryWizard(
mockCli,
mockLanguageClient,
jest.fn(),
mockApp,
mockDatabaseManager,
Expand All @@ -165,6 +173,7 @@ describe("SkeletonQueryWizard", () => {
beforeEach(() => {
wizard = new SkeletonQueryWizard(
mockCli,
mockLanguageClient,
jest.fn(),
mockApp,
mockDatabaseManager,
Expand Down Expand Up @@ -313,6 +322,7 @@ describe("SkeletonQueryWizard", () => {

wizard = new SkeletonQueryWizard(
mockCli,
mockLanguageClient,
jest.fn(),
mockApp,
mockDatabaseManagerWithItems,
Expand Down Expand Up @@ -362,6 +372,7 @@ describe("SkeletonQueryWizard", () => {

wizard = new SkeletonQueryWizard(
mockCli,
mockLanguageClient,
jest.fn(),
mockApp,
mockDatabaseManagerWithItems,
Expand Down Expand Up @@ -466,6 +477,7 @@ describe("SkeletonQueryWizard", () => {

wizard = new SkeletonQueryWizard(
mockCli,
mockLanguageClient,
jest.fn(),
mockApp,
mockDatabaseManager,
Expand Down Expand Up @@ -687,6 +699,7 @@ describe("SkeletonQueryWizard", () => {

wizard = new SkeletonQueryWizard(
mockCli,
mockLanguageClient,
jest.fn(),
mockApp,
mockDatabaseManager,
Expand Down Expand Up @@ -716,6 +729,7 @@ describe("SkeletonQueryWizard", () => {

wizard = new SkeletonQueryWizard(
mockCli,
mockLanguageClient,
jest.fn(),
mockApp,
mockDatabaseManager,
Expand Down Expand Up @@ -749,6 +763,7 @@ describe("SkeletonQueryWizard", () => {

wizard = new SkeletonQueryWizard(
mockCli,
mockLanguageClient,
jest.fn(),
mockApp,
mockDatabaseManager,
Expand Down Expand Up @@ -792,6 +807,7 @@ describe("SkeletonQueryWizard", () => {

wizard = new SkeletonQueryWizard(
mockCli,
mockLanguageClient,
jest.fn(),
mockApp,
mockDatabaseManager,
Expand Down

0 comments on commit 656363b

Please sign in to comment.