Skip to content

Commit

Permalink
fix: handle plural the detailed report title in a simpliest way
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatWizard committed Feb 9, 2022
1 parent 99d3c36 commit 91a91e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13962,7 +13962,9 @@ function computeDiff(base, head, options = {}) {
});

if (table.length > 0 && countRegression > 0) {
summaryTitle = `${countRegression} files with a coverage regression`;
summaryTitle = `${countRegression} file${
countRegression > 1 ? "s" : ""
} with a coverage regression`;
}

let totals = {};
Expand Down
4 changes: 3 additions & 1 deletion src/diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ function computeDiff(base, head, options = {}) {
});

if (table.length > 0 && countRegression > 0) {
summaryTitle = `${countRegression} files with a coverage regression`;
summaryTitle = `${countRegression} file${
countRegression > 1 ? "s" : ""
} with a coverage regression`;
}

let totals = {};
Expand Down

0 comments on commit 91a91e5

Please sign in to comment.