Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/client/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ export function setupEnvironment(
getGenerationState: () => GenerationState,
workflowId: string,
): void {
// If we're in a test, don't patch the global environment
if (process.env.VITEST === "true") {
return;
}
const global = globalThis as Record<string, unknown>;

// Patch Math with seeded random based on workflowId
Expand Down Expand Up @@ -119,7 +123,7 @@ export function setupEnvironment(
};
}

function noop() {}
function noop() { }

// exported for testing
export function createConsole(
Expand Down