(data: Record<string, unknown>)
| 109 | } |
| 110 | |
| 111 | function readUnchangedSnapshot(data: Record<string, unknown>): SnapshotUnchanged | null { |
| 112 | const raw = data.unchanged; |
| 113 | if (!raw || typeof raw !== 'object') return null; |
| 114 | const unchanged = raw as Record<string, unknown>; |
| 115 | if (typeof unchanged.ageMs !== 'number' || typeof unchanged.nodeCount !== 'number') { |
| 116 | return null; |
| 117 | } |
| 118 | return { |
| 119 | ageMs: unchanged.ageMs, |
| 120 | nodeCount: unchanged.nodeCount, |
| 121 | interactiveOnly: unchanged.interactiveOnly === true ? true : undefined, |
| 122 | scope: typeof unchanged.scope === 'string' ? unchanged.scope : undefined, |
| 123 | }; |
| 124 | } |
| 125 | |
| 126 | function formatUnchangedSnapshotText(unchanged: SnapshotUnchanged): string { |
| 127 | const age = formatSnapshotAge(unchanged.ageMs); |
no outgoing calls
no test coverage detected
searching dependent graphs…