Skip to main content

Function: setProcessSnapshotOverrideForTesting()

setProcessSnapshotOverrideForTesting(snapshot: ProcessSnapshot | null): void

Defined in: shared/utils/environment.ts:118

Testing-only setter for the process snapshot. Allows Vitest suites to simulate environments where globalThis.process is missing or has bespoke values without mutating the real Node.js global and destabilizing the test runner.

Parametersโ€‹

snapshotโ€‹

ProcessSnapshot | null

Returnsโ€‹

void

Remarksโ€‹

Use resetProcessSnapshotOverrideForTesting after each test to avoid leaking overrides across suites.