(issues: LayoutIssue[])
| 11 | const CANVAS = { width: 1920, height: 1080 }; |
| 12 | |
| 13 | function expectOne(issues: LayoutIssue[]): LayoutIssue { |
| 14 | expect(issues).toHaveLength(1); |
| 15 | const issue = issues[0]; |
| 16 | if (!issue) throw new Error("expected exactly one issue"); |
| 17 | return issue; |
| 18 | } |
| 19 | |
| 20 | function rect(left: number, top: number, width: number, height: number) { |
| 21 | return { left, top, right: left + width, bottom: top + height, width, height }; |