mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix dock-store.test.ts
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
1b448183f8
commit
3926025d82
@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import hostedClusterIdInjectable from "../../../../common/cluster-store/hosted-cluster-id.injectable";
|
import hostedClusterIdInjectable from "../../../../common/cluster-store/hosted-cluster-id.injectable";
|
||||||
|
import ipcRendererInjectable from "../../../app-paths/get-value-from-registered-channel/ipc-renderer/ipc-renderer.injectable";
|
||||||
import { getDiForUnitTesting } from "../../../getDiForUnitTesting";
|
import { getDiForUnitTesting } from "../../../getDiForUnitTesting";
|
||||||
import type { DockStore, DockTab } from "../dock/store";
|
import type { DockStore, DockTab } from "../dock/store";
|
||||||
import { TabKind } from "../dock/store";
|
import { TabKind } from "../dock/store";
|
||||||
@ -24,6 +25,10 @@ describe("DockStore", () => {
|
|||||||
const di = getDiForUnitTesting({ doGeneralOverrides: true });
|
const di = getDiForUnitTesting({ doGeneralOverrides: true });
|
||||||
|
|
||||||
di.override(hostedClusterIdInjectable, () => "some-cluster-id");
|
di.override(hostedClusterIdInjectable, () => "some-cluster-id");
|
||||||
|
di.override(ipcRendererInjectable, () => ({
|
||||||
|
on: jest.fn(),
|
||||||
|
invoke: jest.fn(), // TODO: replace with proper mocking via the IPC bridge
|
||||||
|
} as never));
|
||||||
|
|
||||||
await di.runSetups();
|
await di.runSetups();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user