MCPcopy Create free account
hub / github.com/EvoMap/evolver / freshRequireForceUpdate

Function freshRequireForceUpdate

test/forceUpdateIdempotent.test.js:27–37  ·  view source on GitHub ↗
(execFileStub)

Source from the content-addressed store, hash-verified

25let installRoot;
26
27function freshRequireForceUpdate(execFileStub) {
28 delete require.cache[forceUpdateModPath];
29 require.cache[pathsModPath] = {
30 id: pathsModPath, filename: pathsModPath, loaded: true,
31 exports: { getEvolverInstallRoot: () => installRoot },
32 };
33 childProcess.execFileSync = execFileStub;
34 const mod = require('../src/forceUpdate');
35 childProcess.execFileSync = origExecFileSync;
36 return mod;
37}
38
39function writeInstallPkg(version) {
40 fs.writeFileSync(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected