(text: string)
| 14 | } |
| 15 | |
| 16 | export function normalizeVisibleSurfaceText(text: string): string { |
| 17 | return normalizeSnapshotText(text) |
| 18 | .split('\n') |
| 19 | .map(row => row.replace(/\s+$/g, '')) |
| 20 | .join('\n') |
| 21 | .replace(/\n+$/g, '') |
| 22 | } |
| 23 | |
| 24 | export function formatTextSnapshot(spec: Omit<TextSnapshotSpec, 'snapshotFileUrl'>): string { |
| 25 | const normalizedValue = normalizeSnapshotText(spec.value) |