(result: CaptureSnapshotResult)
| 171 | } |
| 172 | |
| 173 | export function serializeSnapshotResult(result: CaptureSnapshotResult): Record<string, unknown> { |
| 174 | return { |
| 175 | nodes: result.nodes, |
| 176 | truncated: result.truncated, |
| 177 | ...(result.appName ? { appName: result.appName } : {}), |
| 178 | ...(result.appBundleId ? { appBundleId: result.appBundleId } : {}), |
| 179 | ...(result.visibility ? { visibility: result.visibility } : {}), |
| 180 | ...publicSnapshotCaptureAnnotations(snapshotResultAnnotations(result)), |
| 181 | ...(result.unchanged ? { unchanged: result.unchanged } : {}), |
| 182 | ...(result.snapshotDiagnostics ? { snapshotDiagnostics: result.snapshotDiagnostics } : {}), |
| 183 | }; |
| 184 | } |
| 185 | |
| 186 | function snapshotResultAnnotations( |
| 187 | result: CaptureSnapshotResult, |
no test coverage detected