From a72b1853dda333956c00c7cd4d96161f195d84e5 Mon Sep 17 00:00:00 2001 From: pacien Date: Fri, 19 Oct 2018 10:14:25 +0200 Subject: Add line coverage counter bubble --- src/CoverageListing.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/CoverageListing.js') diff --git a/src/CoverageListing.js b/src/CoverageListing.js index 6b5bc6d..72a5ea8 100644 --- a/src/CoverageListing.js +++ b/src/CoverageListing.js @@ -65,6 +65,13 @@ export class CoverageListing extends Component { .then(content => this.setState({ listingContent: content })); } + _lineCoverageString(coverage) { + const instructionCount = parseInt(coverage.ci) + parseInt(coverage.mi); + const branchCount = parseInt(coverage.cb) + parseInt(coverage.mb); + return coverage.ci + '/' + instructionCount + ' instructions covered, ' + + coverage.cb + '/' + branchCount + ' branches covered'; + } + _renderNone() { return (
{lineContent}
{lineContent}
{lineContent}+