( audit: AuditOutput, scoreTarget: number, )
| 127 | * @returns Audit with scoreTarget field |
| 128 | */ |
| 129 | export function scoreAuditWithTarget( |
| 130 | audit: AuditOutput, |
| 131 | scoreTarget: number, |
| 132 | ): AuditOutput { |
| 133 | return audit.score >= scoreTarget |
| 134 | ? { ...audit, score: 1, scoreTarget } |
| 135 | : { ...audit, scoreTarget }; |
| 136 | } |
| 137 | |
| 138 | /** |
| 139 | * Sets audit scores to 1 when targets are met. |
no outgoing calls
no test coverage detected