(path: string, timeoutMs = 2000)
| 176 | } |
| 177 | |
| 178 | async function waitForFile(path: string, timeoutMs = 2000): Promise<void> { |
| 179 | const deadline = Date.now() + timeoutMs |
| 180 | while (Date.now() < deadline) { |
| 181 | if (existsSync(path)) { |
| 182 | return |
| 183 | } |
| 184 | await Bun.sleep(10) |
| 185 | } |
| 186 | throw new Error(`Timed out waiting for ${path}`) |
| 187 | } |
| 188 | |
| 189 | function splitAfterFirstRenderedRow(serializedDiff: string): [string, string] { |
| 190 | const rowBreak = serializedDiff.indexOf('\r\n') |
no test coverage detected