mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: move test-env specific versions to own folder
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
a97a75c2de
commit
8f8d99fb27
@ -58,7 +58,7 @@ jest.mock("./renderer/components/tooltip/withTooltip");
|
||||
jest.mock("monaco-editor");
|
||||
|
||||
const getInjectables = (environment: "renderer" | "main", filePathGlob: string) => [
|
||||
...glob.sync(`./{common,extensions,${environment}}/**/${filePathGlob}`, {
|
||||
...glob.sync(`./{common,extensions,${environment},test-env}/**/${filePathGlob}`, {
|
||||
cwd: __dirname,
|
||||
}),
|
||||
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { applicationInformationToken } from "@k8slens/application";
|
||||
|
||||
export const applicationInformationFakeInjectable = getInjectable({
|
||||
id: "application-information-fake",
|
||||
|
||||
instantiate: () => ({
|
||||
name: "some-product-name",
|
||||
productName: "some-product-name",
|
||||
version: "6.0.0",
|
||||
updatingIsEnabled: false,
|
||||
k8sProxyVersion: "0.2.1",
|
||||
bundledKubectlVersion: "1.23.3",
|
||||
bundledHelmVersion: "3.7.2",
|
||||
sentryDsn: "",
|
||||
contentSecurityPolicy: "script-src 'unsafe-eval' 'self'; frame-src http://*.localhost:*/; img-src * data:",
|
||||
welcomeRoute: "/welcome",
|
||||
copyright: "some-copyright-information",
|
||||
description: "some-descriptive-text",
|
||||
dependencies: {},
|
||||
}),
|
||||
|
||||
injectionToken: applicationInformationToken,
|
||||
});
|
||||
14
packages/core/src/test-env/node-env.injectable.ts
Normal file
14
packages/core/src/test-env/node-env.injectable.ts
Normal file
@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import { nodeEnvInjectionToken } from "../main/library";
|
||||
|
||||
const nodeEnvForTestingEnvInjectable = getInjectable({
|
||||
id: "node-env-for-testing-env",
|
||||
instantiate: () => "production",
|
||||
injectionToken: nodeEnvInjectionToken,
|
||||
});
|
||||
|
||||
export default nodeEnvForTestingEnvInjectable;
|
||||
Loading…
Reference in New Issue
Block a user