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 b6f83e0
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Check warning

Code scanning / ESLint

Disallow unused variables Warning test

'mock' is defined but never used.

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note test

Unused import mock.

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

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

mockApp = createMockApp();

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

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

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

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

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

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

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

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

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

0 comments on commit b6f83e0

Please sign in to comment.