(execFileStub)
| 28 | let installRoot; |
| 29 | |
| 30 | function 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. |
no outgoing calls
no test coverage detected