( auditOutput: AuditOutput, details: FormattedIcu<Details>, )
| 63 | } |
| 64 | |
| 65 | function processAuditDetails( |
| 66 | auditOutput: AuditOutput, |
| 67 | details: FormattedIcu<Details>, |
| 68 | ): AuditOutput { |
| 69 | try { |
| 70 | const parsedDetails = toAuditDetails(details); |
| 71 | return Object.keys(parsedDetails).length > 0 |
| 72 | ? { ...auditOutput, details: parsedDetails } |
| 73 | : auditOutput; |
| 74 | } catch (error) { |
| 75 | throw new LighthouseAuditParsingError(auditOutput.slug, error); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | export function toAuditOutputs( |
| 80 | lhrAudits: Result[], |
no test coverage detected