Skip to content

Commit

Permalink
tests: Mock EventOperator.getZoweProcessor in Config tests
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Oct 9, 2024
1 parent 3c646a9 commit 1b0ef7f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Config } from "../src/Config";
import { IConfig } from "../src/doc/IConfig";
import { IConfigSecure } from "../src/doc/IConfigSecure";
import { IConfigVault } from "../src/doc/IConfigVault";
import { EventOperator } from "../../events";

const MY_APP = "my_app";

Expand All @@ -36,6 +37,7 @@ const secureConfigs: IConfigSecure = {
describe("Config secure tests", () => {
let mockSecureLoad = jest.fn();
let mockSecureSave = jest.fn();
let mockGetZoweProcessor = jest.spyOn(EventOperator, "getZoweProcessor").mockReturnValue({ emitZoweEvent: jest.fn() } as any);

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note test

Unused variable mockGetZoweProcessor.
let mockVault: IConfigVault = {
load: mockSecureLoad,
save: mockSecureSave
Expand Down

0 comments on commit 1b0ef7f

Please sign in to comment.