Skip to content

Commit

Permalink
fix: functionMap is sometimes missing a key from functions (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kosta-Github authored and bcoe committed Dec 24, 2018
1 parent de9c921 commit 399f215
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/istanbul-reports/lib/lcovonly/index.js
Expand Up @@ -27,14 +27,14 @@ LcovOnlyReport.prototype.onDetail = function (node) {
writer.println('TN:'); //no test name
writer.println('SF:' + fc.path);

Object.keys(functions).forEach(function (key) {
Object.keys(functionMap).forEach(function (key) {
var meta = functionMap[key];
writer.println('FN:' + [meta.decl.start.line, meta.name].join(','));
});
writer.println('FNF:' + summary.functions.total);
writer.println('FNH:' + summary.functions.covered);

Object.keys(functions).forEach(function (key) {
Object.keys(functionMap).forEach(function (key) {
var stats = functions[key],
meta = functionMap[key];
writer.println('FNDA:' + [stats, meta.name].join(','));
Expand Down

0 comments on commit 399f215

Please sign in to comment.