1
0
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:
Iku-turso 2022-04-12 15:46:58 +03:00 committed by Janne Savolainen
parent 9b48478c2d
commit c9832a2702
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
2 changed files with 13 additions and 3 deletions

View File

@ -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;
/** /**

View 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;