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-tursoandJanne Savolainen authored and Janne Savolainen committed 2022-05-11 08:25:28 +03:00
1 parent 9b48478c2d
commit c9832a2702
2 files changed
+13 -3

No files matched your search

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