()
| 259 | }); |
| 260 | |
| 261 | async 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. |
no test coverage detected