(filePair: FilePair)
| 53 | |
| 54 | /** Determines whether the before & after images are the same size. */ |
| 55 | export function isSameSizeImagePair(filePair: FilePair) { |
| 56 | if (!filePair.is_image_diff) return false; |
| 57 | if (isOneSided(filePair)) return false; |
| 58 | if (!filePair.a || !filePair.b) return false; |
| 59 | const imA = filePair.image_a, |
| 60 | imB = filePair.image_b; |
| 61 | return imA.width == imB.width && imA.height == imB.height; |
| 62 | } |
| 63 | |
| 64 | export function assertUnreachable(x: never): never { |
| 65 | throw new Error(x); |
no test coverage detected