(values)
| 12 | } |
| 13 | |
| 14 | function buildStat(values) { |
| 15 | if (values.length === 0) { |
| 16 | return { |
| 17 | total: 0, |
| 18 | average: 0, |
| 19 | min: 0, |
| 20 | max: 0, |
| 21 | }; |
| 22 | } |
| 23 | |
| 24 | const total = values.reduce((sum, value) => sum + value, 0); |
| 25 | return { |
| 26 | total, |
| 27 | average: round(total / values.length), |
| 28 | min: Math.min(...values), |
| 29 | max: Math.max(...values), |
| 30 | }; |
| 31 | } |
| 32 | |
| 33 | function classifyEstimateAlignment(deltaRatio) { |
| 34 | if (deltaRatio <= 0.2) { |
no test coverage detected