mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix fake implementation for join paths
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
parent
af3325e816
commit
6a9f77757f
@ -2,7 +2,6 @@
|
|||||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
* 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";
|
import type { JoinPaths } from "../path/join-paths.injectable";
|
||||||
|
|
||||||
export const joinPathsFake: JoinPaths = join("/");
|
export const joinPathsFake: JoinPaths = (...args) => args.join("/");
|
||||||
|
|||||||
@ -7,6 +7,8 @@ import getElectronAppPathInjectable from "./get-electron-app-path.injectable";
|
|||||||
import { getDiForUnitTesting } from "../../getDiForUnitTesting";
|
import { getDiForUnitTesting } from "../../getDiForUnitTesting";
|
||||||
import type { App } from "electron";
|
import type { App } from "electron";
|
||||||
import registerChannelInjectable from "../register-channel/register-channel.injectable";
|
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", () => {
|
describe("get-electron-app-path", () => {
|
||||||
let getElectronAppPath: (name: string) => string | null;
|
let getElectronAppPath: (name: string) => string | null;
|
||||||
@ -31,6 +33,7 @@ describe("get-electron-app-path", () => {
|
|||||||
|
|
||||||
di.override(electronAppInjectable, () => appStub);
|
di.override(electronAppInjectable, () => appStub);
|
||||||
di.override(registerChannelInjectable, () => () => undefined);
|
di.override(registerChannelInjectable, () => () => undefined);
|
||||||
|
di.override(joinPathsInjectable, () => joinPathsFake);
|
||||||
|
|
||||||
await di.runSetups();
|
await di.runSetups();
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user