MCPcopy
hub / github.com/di-sukharev/opencommit / resetEnv

Function resetEnv

test/unit/proxy.test.ts:13–21  ·  view source on GitHub ↗
(env: NodeJS.ProcessEnv)

Source from the content-addressed store, hash-verified

11 const originalAxiosHttpsAgent = axios.defaults.httpsAgent;
12
13 function resetEnv(env: NodeJS.ProcessEnv) {
14 Object.keys(process.env).forEach((key) => {
15 if (!(key in env)) {
16 delete process.env[key];
17 } else {
18 process.env[key] = env[key];
19 }
20 });
21 }
22
23 beforeEach(() => {
24 resetEnv(originalEnv);

Callers 1

proxy.test.tsFile · 0.70

Calls 2

forEachMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…