(leftValue, rightValue, formatter)
| 1465 | } |
| 1466 | |
| 1467 | function formatDelta(leftValue, rightValue, formatter) { |
| 1468 | if (leftValue === null || leftValue === undefined || rightValue === null || rightValue === undefined) { |
| 1469 | return "n/a"; |
| 1470 | } |
| 1471 | const diff = rightValue - leftValue; |
| 1472 | if (!Number.isFinite(diff)) { |
| 1473 | return "n/a"; |
| 1474 | } |
| 1475 | const prefix = diff > 0 ? "+" : ""; |
| 1476 | return `${prefix}${formatter(diff)}`; |
| 1477 | } |
| 1478 | |
| 1479 | function describeDelta(leftValue, rightValue, formatter) { |
| 1480 | if (leftValue === null || leftValue === undefined || rightValue === null || rightValue === undefined) { |
no outgoing calls
no test coverage detected