1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix code style

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2022-05-04 13:40:03 +03:00
parent 1867d22fc9
commit 5b65a93849
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
5 changed files with 10 additions and 22 deletions

View File

@ -3,28 +3,14 @@
* 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 type { RenderResult } from "@testing-library/react"; import type { RenderResult } from "@testing-library/react";
import { import type { ApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
ApplicationBuilder, import { getApplicationBuilder } from "../../renderer/components/test-utils/get-application-builder";
getApplicationBuilder,
} from "../../renderer/components/test-utils/get-application-builder";
describe("helm-charts - navigation to Helm charts", () => { describe("helm-charts - navigation to Helm charts", () => {
let applicationBuilder: ApplicationBuilder; let applicationBuilder: ApplicationBuilder;
beforeEach(() => { beforeEach(() => {
applicationBuilder = getApplicationBuilder(); applicationBuilder = getApplicationBuilder();
// applicationBuilder.beforeSetups(({ rendererDi }) => {
// const userStoreStub = {
// extensionRegistryUrl: { customUrl: "some-custom-url" },
// } as unknown as UserStore;
//
// rendererDi.override(userStoreInjectable, () => userStoreStub);
//
// const themeStoreStub = ({ themeOptions: [] }) as unknown as ThemeStore;
//
// rendererDi.override(themeStoreInjectable, () => themeStoreStub);
// });
}); });
describe("when navigating to Helm charts", () => { describe("when navigating to Helm charts", () => {

View File

@ -85,6 +85,7 @@ describe("HotbarStore", () => {
di.unoverride(hotbarStoreInjectable); di.unoverride(hotbarStoreInjectable);
di.override(catalogEntityRegistryInjectable, () => ({ di.override(catalogEntityRegistryInjectable, () => ({
// eslint-disable-next-line unused-imports/no-unused-vars-ts
addComputedSource: (id, source) => {}, addComputedSource: (id, source) => {},
items: [ items: [
getMockCatalogEntity({ getMockCatalogEntity({

View File

@ -5,15 +5,14 @@
import { UserStore } from "../../common/user-store"; import { UserStore } from "../../common/user-store";
import type { ContextHandler } from "../context-handler/context-handler"; import type { ContextHandler } from "../context-handler/context-handler";
import type { PrometheusService } from "../prometheus"; import type { PrometheusService, PrometheusProviderRegistry } from "../prometheus";
import { PrometheusProvider, PrometheusProviderRegistry } from "../prometheus"; import { PrometheusProvider } from "../prometheus";
import mockFs from "mock-fs"; import mockFs from "mock-fs";
import { getDiForUnitTesting } from "../getDiForUnitTesting"; import { getDiForUnitTesting } from "../getDiForUnitTesting";
import createContextHandlerInjectable from "../context-handler/create-context-handler.injectable"; import createContextHandlerInjectable from "../context-handler/create-context-handler.injectable";
import type { Cluster } from "../../common/cluster/cluster"; import type { Cluster } from "../../common/cluster/cluster";
import createKubeAuthProxyInjectable from "../kube-auth-proxy/create-kube-auth-proxy.injectable"; import createKubeAuthProxyInjectable from "../kube-auth-proxy/create-kube-auth-proxy.injectable";
import prometheusProviderRegistryInjectable import prometheusProviderRegistryInjectable from "../prometheus/prometheus-provider-registry.injectable";
from "../prometheus/prometheus-provider-registry.injectable";
jest.mock("electron", () => ({ jest.mock("electron", () => ({
app: { app: {

View File

@ -17,7 +17,8 @@ import { bytesToUnits, getOrInsertWith, iter, noop } from "../../../common/utils
import logger from "../../logger"; import logger from "../../logger";
import type { KubeConfig } from "@kubernetes/client-node"; import type { KubeConfig } from "@kubernetes/client-node";
import { loadConfigFromString, splitConfig } from "../../../common/kube-helpers"; import { loadConfigFromString, splitConfig } from "../../../common/kube-helpers";
import { catalogEntityFromCluster, ClusterManager } from "../../cluster-manager"; import type { ClusterManager } from "../../cluster-manager";
import { catalogEntityFromCluster } from "../../cluster-manager";
import { UserStore } from "../../../common/user-store"; import { UserStore } from "../../../common/user-store";
import { ClusterStore } from "../../../common/cluster-store/cluster-store"; import { ClusterStore } from "../../../common/cluster-store/cluster-store";
import { createHash } from "crypto"; import { createHash } from "crypto";

View File

@ -2,7 +2,8 @@
* 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 request, { RequestPromiseOptions } from "request-promise-native"; import type { RequestPromiseOptions } from "request-promise-native";
import request from "request-promise-native";
import { apiKubePrefix } from "../common/vars"; import { apiKubePrefix } from "../common/vars";
import type { Cluster } from "../common/cluster/cluster"; import type { Cluster } from "../common/cluster/cluster";
import { getInjectable } from "@ogre-tools/injectable"; import { getInjectable } from "@ogre-tools/injectable";