MCPcopy Create free account
hub / github.com/EvoMap/evolver / makeDegitFailureThenTarballSuccess

Function makeDegitFailureThenTarballSuccess

test/forceUpdateKeepList.test.js:127–140  ·  view source on GitHub ↗
(version, degitError)

Source from the content-addressed store, hash-verified

125}
126
127function makeDegitFailureThenTarballSuccess(version, degitError) {
128 const calls = [];
129 const stub = function (bin, args) {
130 calls.push({ bin, args: Array.isArray(args) ? args.slice() : [] });
131 if (bin === process.execPath) {
132 const archivePath = args[3];
133 fs.writeFileSync(archivePath, makeReleaseTarball(version));
134 return '';
135 }
136 throw degitError;
137 };
138 stub.calls = calls;
139 return stub;
140}
141
142function populateFakeInstall(root) {
143 // Package identity (required by the guard at the top of executeForceUpdate)

Calls

no outgoing calls

Tested by

no test coverage detected