MCPcopy
hub / github.com/promptfoo/promptfoo / replaceProcessEnv

Function replaceProcessEnv

test/util/utils.ts:88–93  ·  view source on GitHub ↗
(nextEnv: Record<string, string | undefined>)

Source from the content-addressed store, hash-verified

86}
87
88function replaceProcessEnv(nextEnv: Record<string, string | undefined>): void {
89 for (const key of Object.keys(process.env)) {
90 Reflect.deleteProperty(process.env, key);
91 }
92 Object.assign(process.env, nextEnv);
93}
94
95export function mockProcessEnv(
96 overrides: Record<string, string | undefined> = {},

Callers 1

mockProcessEnvFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…