mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Extract "isIntegrationTesting" as dependency for having a side-effect
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi> Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
This commit is contained in:
parent
9b48478c2d
commit
c9832a2702
@ -36,9 +36,6 @@ export const isDevelopment = !isTestEnv && !isProduction;
|
|||||||
|
|
||||||
export const isPublishConfigured = Object.keys(packageInfo.build).includes("publish");
|
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;
|
export const productName = packageInfo.productName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
13
src/common/vars/is-integration-testing.injectable.ts
Normal file
13
src/common/vars/is-integration-testing.injectable.ts
Normal file
@ -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;
|
||||||
Loading…
Reference in New Issue
Block a user