MCPcopy Create free account
hub / github.com/vercel/vercel / waitForCacheFile

Function waitForCacheFile

packages/cli/test/unit/util/get-latest-version.test.ts:261–269  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

259});
260
261async function waitForCacheFile() {
262 const seconds = 20;
263 for (let i = 0; i < seconds * 4; i++) {
264 await sleep(250);
265 if (await fs.pathExists(cacheFile)) {
266 return;
267 }
268 }
269}
270
271// Mock fetchDistTags (the dependency of fetchLatestVersion) so we can test
272// fetchLatestVersion's logic without hitting the network.

Callers 1

Calls 1

sleepFunction · 0.50

Tested by

no test coverage detected