From 6a9f77757fb114d85c0be99cd74615a92ffa45e3 Mon Sep 17 00:00:00 2001 From: Janne Savolainen Date: Wed, 30 Mar 2022 12:28:20 +0300 Subject: [PATCH] Fix fake implementation for join paths Signed-off-by: Janne Savolainen --- src/common/test-utils/join-paths-fake.ts | 3 +-- .../get-electron-app-path/get-electron-app-path.test.ts | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/test-utils/join-paths-fake.ts b/src/common/test-utils/join-paths-fake.ts index 99dd42a8ec..2796423d3c 100644 --- a/src/common/test-utils/join-paths-fake.ts +++ b/src/common/test-utils/join-paths-fake.ts @@ -2,7 +2,6 @@ * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ -import { join } from "lodash/fp"; import type { JoinPaths } from "../path/join-paths.injectable"; -export const joinPathsFake: JoinPaths = join("/"); +export const joinPathsFake: JoinPaths = (...args) => args.join("/"); diff --git a/src/main/app-paths/get-electron-app-path/get-electron-app-path.test.ts b/src/main/app-paths/get-electron-app-path/get-electron-app-path.test.ts index 8eeb24ce1f..2c0d19e571 100644 --- a/src/main/app-paths/get-electron-app-path/get-electron-app-path.test.ts +++ b/src/main/app-paths/get-electron-app-path/get-electron-app-path.test.ts @@ -7,6 +7,8 @@ import getElectronAppPathInjectable from "./get-electron-app-path.injectable"; import { getDiForUnitTesting } from "../../getDiForUnitTesting"; import type { App } from "electron"; import registerChannelInjectable from "../register-channel/register-channel.injectable"; +import joinPathsInjectable from "../../../common/path/join-paths.injectable"; +import { joinPathsFake } from "../../../common/test-utils/join-paths-fake"; describe("get-electron-app-path", () => { let getElectronAppPath: (name: string) => string | null; @@ -31,6 +33,7 @@ describe("get-electron-app-path", () => { di.override(electronAppInjectable, () => appStub); di.override(registerChannelInjectable, () => () => undefined); + di.override(joinPathsInjectable, () => joinPathsFake); await di.runSetups();