(url, init)
| 80 | } |
| 81 | |
| 82 | async function fetchJson(url, init) { |
| 83 | const response = await fetch(url, init); |
| 84 | if (!response.ok) { |
| 85 | throw new Error( |
| 86 | `${url} returned ${response.status}: ${await response.text()}`, |
| 87 | ); |
| 88 | } |
| 89 | return response.json(); |
| 90 | } |
| 91 | |
| 92 | async function fetchReferenceScreenshotDataUrl(udid) { |
| 93 | if (!screenshotApiRoot) { |
no test coverage detected