(execFileStub)
| 37 | let installRoot; |
| 38 | |
| 39 | function 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. |
| 54 | function makeSuccessfulDegitWithIndex(version, indexContent) { |
no outgoing calls
no test coverage detected