diff --git a/dist/main.js b/dist/main.js index df1e2d5b..ba98502a 100644 --- a/dist/main.js +++ b/dist/main.js @@ -22793,6 +22793,7 @@ const fragment = function(...children) { function tabulate(lcov, options) { const head = tr( th("File"), + th("Stmts"), th("Branches"), th("Funcs"), th("Lines"), @@ -22826,12 +22827,28 @@ function toFolder(path) { return "" } - return tr(td({ colspan: 5 }, b(path))) + return tr(td({ colspan: 6 }, b(path))) +} + +function getStatement(file) { + const { branches, functions, lines } = file; + + return [branches, functions, lines].reduce(function(acc, curr) { + if (!curr) { + return acc + } + + return { + hit: acc.hit + curr.hit, + found: acc.found + curr.found, + } + }, { hit: 0, found: 0 }) } function toRow(file, indent, options) { return tr( td(filename(file, indent, options)), + td(percentage$1(getStatement(file))), td(percentage$1(file.branches)), td(percentage$1(file.functions)), td(percentage$1(file.lines)), @@ -22909,7 +22926,6 @@ function ranges(linenos) { res.push(last); } - console.log(linenos, res); return res }