(path, timeoutMs)
| 95 | } |
| 96 | |
| 97 | async function waitForFile(path, timeoutMs) { |
| 98 | const startedAt = performance.now() |
| 99 | const deadline = startedAt + timeoutMs |
| 100 | while (performance.now() < deadline) { |
| 101 | if (await fileExists(path)) return round(performance.now() - startedAt) |
| 102 | await sleep(50) |
| 103 | } |
| 104 | return null |
| 105 | } |
| 106 | |
| 107 | function run(command, args, options = {}) { |
| 108 | return new Promise((resolvePromise, rejectPromise) => { |
no test coverage detected