Merge pull request #20162 from ganhammar/fix/correct-coverage-statistics

Fix/correct coverage statistics
This commit is contained in:
Patrik Oldsberg
2023-09-28 21:30:40 +02:00
committed by GitHub
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-code-coverage': patch
---
Fixed the coverage history statistics to compare newest with oldest record
@@ -113,8 +113,8 @@ export const CoverageHistoryChart = () => {
);
}
const oldestCoverage = valueHistory.history[0];
const [latestCoverage] = valueHistory.history.slice(-1);
const [oldestCoverage] = valueHistory.history.slice(-1);
const latestCoverage = valueHistory.history[0];
const getTrendForCoverage = (type: Coverage) => {
if (!oldestCoverage[type].percentage) {