-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enhance file coverage reporting with comparison metrics
- Loading branch information
1 parent
ba33784
commit 2a741d6
Showing
6 changed files
with
97 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { icons } from "../icons"; | ||
|
||
function getCompareString(percentDiff: number): string { | ||
if (percentDiff === 0) { | ||
return `${icons.equal} <em>±0%</em>`; | ||
} | ||
|
||
if (percentDiff > 0) { | ||
return `${icons.increase} <em>+${percentDiff.toFixed(2)}%</em>`; | ||
} | ||
|
||
// The - char is already included in a negative number | ||
return `${icons.decrease} <em>${percentDiff.toFixed(2)}%</em>`; | ||
} | ||
|
||
export { getCompareString }; |
2a741d6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage Report
⬆️ +0.59%
⬆️ +0.59%
⬆️ +0.41%
⬆️ +0.11%
File Coverage
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%
🟰 ±0%