diff --git a/src/common/vars.ts b/src/common/vars.ts index 8e0a1acf79..20e1bfa8e1 100644 --- a/src/common/vars.ts +++ b/src/common/vars.ts @@ -36,9 +36,6 @@ export const isDevelopment = !isTestEnv && !isProduction; export const isPublishConfigured = Object.keys(packageInfo.build).includes("publish"); -export const integrationTestingArg = "--integration-testing"; -export const isIntegrationTesting = process.argv.includes(integrationTestingArg); - export const productName = packageInfo.productName; /** diff --git a/src/common/vars/is-integration-testing.injectable.ts b/src/common/vars/is-integration-testing.injectable.ts new file mode 100644 index 0000000000..9f6b8c6412 --- /dev/null +++ b/src/common/vars/is-integration-testing.injectable.ts @@ -0,0 +1,13 @@ +/** + * 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"; + +const isIntegrationTestingInjectable = getInjectable({ + id: "is-integration-testing", + instantiate: () => process.argv.includes("--integration-testing"), + causesSideEffects: true, +}); + +export default isIntegrationTestingInjectable;