MCPcopy
hub / github.com/promptfoo/promptfoo / restoreTraceFetchEnv

Function restoreTraceFetchEnv

test/assertions/trace.test.ts:72–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70 };
71
72 const restoreTraceFetchEnv = () => {
73 for (const [name, value] of Object.entries(originalTraceFetchEnv)) {
74 if (value === undefined) {
75 mockProcessEnv({ [name]: undefined });
76 } else {
77 mockProcessEnv({ [name]: value });
78 }
79 }
80 };
81
82 beforeEach(() => {
83 mockTraceStore.getTrace.mockReset();

Callers 1

trace.test.tsFile · 0.85

Calls 1

mockProcessEnvFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…