(data: ScreenshotDiffResult, useColor: boolean)
| 395 | } |
| 396 | |
| 397 | function formatScreenshotDiffRegionLines(data: ScreenshotDiffResult, useColor: boolean): string[] { |
| 398 | const regions = Array.isArray(data.regions) ? data.regions : []; |
| 399 | if (regions.length === 0) return []; |
| 400 | |
| 401 | const lines = [` ${formatMuted('Changed regions:', useColor)}`]; |
| 402 | for (const region of regions.slice(0, 5)) { |
| 403 | lines.push(...formatScreenshotDiffRegionEntryLines(region)); |
| 404 | } |
| 405 | return lines; |
| 406 | } |
| 407 | |
| 408 | function formatScreenshotDiffRegionEntryLines(region: ScreenshotDiffRegion): string[] { |
| 409 | const share = |
no test coverage detected