diff --git a/packages/core/src/jest.setup.ts b/packages/core/src/jest.setup.ts index bfc5d42cb7..96a4b816d4 100644 --- a/packages/core/src/jest.setup.ts +++ b/packages/core/src/jest.setup.ts @@ -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, }), diff --git a/packages/core/src/common/vars/application-information-fake.injectable.testing-env.ts b/packages/core/src/test-env/application-information-fake.injectable.ts similarity index 87% rename from packages/core/src/common/vars/application-information-fake.injectable.testing-env.ts rename to packages/core/src/test-env/application-information-fake.injectable.ts index 1fd988b817..c5d9bfa8d2 100644 --- a/packages/core/src/common/vars/application-information-fake.injectable.testing-env.ts +++ b/packages/core/src/test-env/application-information-fake.injectable.ts @@ -18,9 +18,7 @@ export const applicationInformationFakeInjectable = getInjectable({ bundledKubectlVersion: "1.23.3", bundledHelmVersion: "3.7.2", sentryDsn: "", - contentSecurityPolicy: - "script-src 'unsafe-eval' 'self'; frame-src http://*.localhost:*/; img-src * data:", - + contentSecurityPolicy: "script-src 'unsafe-eval' 'self'; frame-src http://*.localhost:*/; img-src * data:", welcomeRoute: "/welcome", copyright: "some-copyright-information", description: "some-descriptive-text", diff --git a/packages/core/src/common/vars/node-env.injectable.testing-env.ts b/packages/core/src/test-env/node-env.injectable.ts similarity index 59% rename from packages/core/src/common/vars/node-env.injectable.testing-env.ts rename to packages/core/src/test-env/node-env.injectable.ts index 20d041330f..b08639d94c 100644 --- a/packages/core/src/common/vars/node-env.injectable.testing-env.ts +++ b/packages/core/src/test-env/node-env.injectable.ts @@ -3,12 +3,12 @@ * Licensed under MIT License. See LICENSE in root directory for more information. */ import { getInjectable } from "@ogre-tools/injectable"; -import { nodeEnvInjectionToken } from "./node-env-injection-token"; +import { nodeEnvInjectionToken } from "../main/library"; -const nodeEnvFakeInjectable = getInjectable({ - id: "node-env-fake", +const nodeEnvForTestingEnvInjectable = getInjectable({ + id: "node-env-for-testing-env", instantiate: () => "production", injectionToken: nodeEnvInjectionToken, }); -export default nodeEnvFakeInjectable; +export default nodeEnvForTestingEnvInjectable;