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

Function freshRequireForceUpdate

test/forceUpdateMidCopyWedge.test.js:39–51  ·  view source on GitHub ↗
(execFileStub)

Source from the content-addressed store, hash-verified

37let installRoot;
38
39function freshRequireForceUpdate(execFileStub) {
40 delete require.cache[forceUpdateModPath];
41 require.cache[pathsModPath] = {
42 id: pathsModPath, filename: pathsModPath, loaded: true,
43 exports: { getEvolverInstallRoot: () => installRoot },
44 };
45 childProcess.execFileSync = execFileStub;
46 try {
47 return require('../src/forceUpdate');
48 } finally {
49 childProcess.execFileSync = origExecFileSync;
50 }
51}
52
53// Fake degit: write a new-version package.json + bootstrap + code file into TMP_TARGET.
54function makeSuccessfulDegitWithIndex(version, indexContent) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected