(score: number)
| 27 | } |
| 28 | |
| 29 | export function formatReportScore(score: number): string { |
| 30 | const scaledScore = score * 100; |
| 31 | const roundedScore = Math.round(scaledScore); |
| 32 | |
| 33 | return roundedScore === 100 && score !== 1 |
| 34 | ? Math.floor(scaledScore).toString() |
| 35 | : roundedScore.toString(); |
| 36 | } |
| 37 | |
| 38 | export function formatScoreWithColor( |
| 39 | score: number, |
no test coverage detected