Use isInTestMode() instead of NODE_ENV

This commit is contained in:
Robert
2026-06-02 10:01:35 +01:00
parent d40e417f3c
commit b37e12b418
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -157483,7 +157483,7 @@ async function waitForProcessing(repositoryNwo, sarifID, logger, options = {
try {
const client = getApiClient();
let statusCheckBackoff = STATUS_CHECK_INITIAL_BACKOFF_MILLISECONDS;
if (process.env["NODE_ENV"] !== "test") {
if (!isInTestMode()) {
await delay(statusCheckBackoff, { allowProcessExit: false });
}
for (let statusCheckCount = 1; statusCheckCount <= STATUS_CHECK_MAX_TRIES; statusCheckCount++) {
+2 -1
View File
@@ -36,6 +36,7 @@ import {
getRequiredEnvParam,
GitHubVariant,
GitHubVersion,
isInTestMode,
satisfiesGHESVersion,
} from "./util";
@@ -858,7 +859,7 @@ export async function waitForProcessing(
// Do an initial wait because processing will always take a minimum of 2-3 seconds
let statusCheckBackoff = STATUS_CHECK_INITIAL_BACKOFF_MILLISECONDS;
if (process.env["NODE_ENV"] !== "test") {
if (!isInTestMode()) {
await util.delay(statusCheckBackoff, { allowProcessExit: false });
}