From 28b0f618be308911d7dc36c5a526f042a3935f5e Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Tue, 1 Dec 2020 10:21:29 +0200 Subject: [PATCH] fix cluster-store tests Signed-off-by: Jari Kolehmainen --- src/common/__tests__/cluster-store.test.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/common/__tests__/cluster-store.test.ts b/src/common/__tests__/cluster-store.test.ts index 789c3b1fdd..d2d31302d1 100644 --- a/src/common/__tests__/cluster-store.test.ts +++ b/src/common/__tests__/cluster-store.test.ts @@ -7,6 +7,20 @@ import { workspaceStore } from "../workspace-store"; const testDataIcon = fs.readFileSync("test-data/cluster-store-migration-icon.png"); +jest.mock("electron", () => { + return { + app: { + getVersion: () => "99.99.99", + getPath: () => "tmp", + getLocale: () => "en" + }, + ipcMain: { + handle: jest.fn(), + on: jest.fn() + } + }; +}); + let clusterStore: ClusterStore; describe("empty config", () => {