From b37e12b41831aa41d08ac6f6bcf633bd64de32b0 Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 2 Jun 2026 10:01:35 +0100 Subject: [PATCH] Use isInTestMode() instead of NODE_ENV --- lib/entry-points.js | 2 +- src/upload-lib.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/entry-points.js b/lib/entry-points.js index 1a19e2a49..9a6746c4d 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -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++) { diff --git a/src/upload-lib.ts b/src/upload-lib.ts index 83d1eaffb..3895a53fa 100644 --- a/src/upload-lib.ts +++ b/src/upload-lib.ts @@ -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 }); }