MCPcopy Index your code
hub / github.com/EvoMap/evolver / freshRequireForceUpdate

Function freshRequireForceUpdate

test/forceUpdateFailureCodes.test.js:30–40  ·  view source on GitHub ↗
(execFileStub)

Source from the content-addressed store, hash-verified

28let installRoot;
29
30function freshRequireForceUpdate(execFileStub) {
31 delete require.cache[forceUpdateModPath];
32 require.cache[pathsModPath] = {
33 id: pathsModPath, filename: pathsModPath, loaded: true,
34 exports: { getEvolverInstallRoot: () => installRoot },
35 };
36 childProcess.execFileSync = execFileStub;
37 const mod = require('../src/forceUpdate');
38 childProcess.execFileSync = origExecFileSync;
39 return mod;
40}
41
42// Write the install-root package.json. name defaults to the real package name
43// so the install-guard passes; override it to exercise the guard.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected