()
| 162 | // `tmpPkg.version` is falsy -> download_incomplete (a malformed/incomplete |
| 163 | // download, distinct from a present-but-wrong-version tag mismatch). |
| 164 | function makeVersionlessDegit() { |
| 165 | return function (bin, args) { |
| 166 | if (!String(bin).includes('npx')) throw new Error('unexpected fallback call'); |
| 167 | const tmpTarget = args[args.length - 1]; |
| 168 | fs.mkdirSync(tmpTarget, { recursive: true }); |
| 169 | fs.writeFileSync( |
| 170 | path.join(tmpTarget, 'package.json'), |
| 171 | JSON.stringify({ name: '@evomap/evolver' }), |
| 172 | 'utf8', |
| 173 | ); |
| 174 | fs.writeFileSync(path.join(tmpTarget, 'index.js'), '// no version', 'utf8'); |
| 175 | }; |
| 176 | } |
| 177 | |
| 178 | describe('executeForceUpdate: structured failure taxonomy', () => { |
| 179 | before(() => { |
no outgoing calls
no test coverage detected