Skip to content

Commit

Permalink
Fix unit tests in CI by removing explicit side-effect
Browse files Browse the repository at this point in the history
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>

Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
  • Loading branch information
Iku-turso committed Mar 29, 2022
1 parent e8d8012 commit 3c86646
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/menu/get-app-menu-items.injectable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
import { getInjectable } from "@ogre-tools/injectable";
import { checkForUpdates } from "../app-updater";
import { docsUrl, isMac, productName, supportUrl } from "../../common/vars";
import { docsUrl, productName, supportUrl } from "../../common/vars";
import { exitApp } from "../exit-app";
import { broadcastMessage } from "../../common/ipc";
import { openBrowser } from "../../common/utils";
Expand All @@ -25,6 +25,7 @@ import navigateToExtensionsInjectable from "../../common/front-end-routing/route
import navigateToCatalogInjectable from "../../common/front-end-routing/routes/catalog/navigate-to-catalog.injectable";
import navigateToWelcomeInjectable from "../../common/front-end-routing/routes/welcome/navigate-to-welcome.injectable";
import navigateToAddClusterInjectable from "../../common/front-end-routing/routes/add-cluster/navigate-to-add-cluster.injectable";
import isMacInjectable from "../../common/vars/is-mac.injectable";

function ignoreIf(check: boolean, menuItems: MenuItemConstructorOptions[]) {
return check ? [] : menuItems;
Expand All @@ -49,6 +50,7 @@ const getAppMenuItemsInjectable = getInjectable({
const navigateToCatalog = di.inject(navigateToCatalogInjectable);
const navigateToWelcome = di.inject(navigateToWelcomeInjectable);
const navigateToAddCluster = di.inject(navigateToAddClusterInjectable);
const isMac = di.inject(isMacInjectable);

return (): MenuItemsOpts[] => {
const autoUpdateDisabled = !isAutoUpdateEnabled();
Expand Down

0 comments on commit 3c86646

Please sign in to comment.