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

Function freshRequireForceUpdate

test/forceUpdateKeepList.test.js:21–33  ·  view source on GitHub ↗
(execFileStub)

Source from the content-addressed store, hash-verified

19let installRoot;
20
21function freshRequireForceUpdate(execFileStub) {
22 delete require.cache[forceUpdateModPath];
23 require.cache[pathsModPath] = {
24 id: pathsModPath, filename: pathsModPath, loaded: true,
25 exports: { getEvolverInstallRoot: () => installRoot },
26 };
27 childProcess.execFileSync = execFileStub;
28 try {
29 return require('../src/forceUpdate');
30 } finally {
31 childProcess.execFileSync = origExecFileSync;
32 }
33}
34
35// Fake degit: write a new-version package.json + index.js into TMP_TARGET.
36// args layout: ['-y', 'degit', 'EvoMap/evolver', <TMP_TARGET>]

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected