Skip to content

Commit 91a91e5

Browse files
committed
fix: handle plural the detailed report title in a simpliest way
1 parent 99d3c36 commit 91a91e5

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

dist/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13962,7 +13962,9 @@ function computeDiff(base, head, options = {}) {
1396213962
});
1396313963

1396413964
if (table.length > 0 && countRegression > 0) {
13965-
summaryTitle = `${countRegression} files with a coverage regression`;
13965+
summaryTitle = `${countRegression} file${
13966+
countRegression > 1 ? "s" : ""
13967+
} with a coverage regression`;
1396613968
}
1396713969

1396813970
let totals = {};

src/diff.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ function computeDiff(base, head, options = {}) {
6464
});
6565

6666
if (table.length > 0 && countRegression > 0) {
67-
summaryTitle = `${countRegression} files with a coverage regression`;
67+
summaryTitle = `${countRegression} file${
68+
countRegression > 1 ? "s" : ""
69+
} with a coverage regression`;
6870
}
6971

7072
let totals = {};

0 commit comments

Comments
 (0)