From 6e08b427054c651e7860e6feca0bea075bb38384 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 21 Apr 2022 13:20:55 -0400 Subject: [PATCH] fix hotbar-remove-command.test.tsx Signed-off-by: Sebastian Malton --- .../hotbar/__tests__/hotbar-remove-command.test.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/renderer/components/hotbar/__tests__/hotbar-remove-command.test.tsx b/src/renderer/components/hotbar/__tests__/hotbar-remove-command.test.tsx index 34c9588d0f..c788fbacaa 100644 --- a/src/renderer/components/hotbar/__tests__/hotbar-remove-command.test.tsx +++ b/src/renderer/components/hotbar/__tests__/hotbar-remove-command.test.tsx @@ -19,6 +19,7 @@ import getConfigurationFileModelInjectable from "../../../../common/get-configur import appVersionInjectable from "../../../../common/get-configuration-file-model/app-version/app-version.injectable"; import type { HotbarStore } from "../../../../common/hotbars/store"; import createStoresAndApisInjectable from "../../../create-stores-apis.injectable"; +import ipcRendererInjectable from "../../../app-paths/get-value-from-registered-channel/ipc-renderer/ipc-renderer.injectable"; const mockHotbars: Partial> = { "1": { @@ -46,6 +47,10 @@ describe("", () => { di.override(createStoresAndApisInjectable, () => true); di.override(directoryForUserDataInjectable, () => "some-directory-for-user-data"); + di.override(ipcRendererInjectable, () => ({ + on: jest.fn(), + invoke: jest.fn(), // TODO: replace with proper mocking via the IPC bridge + } as never)); di.permitSideEffects(hotbarStoreInjectable); di.permitSideEffects(getConfigurationFileModelInjectable);