Skip to content

Commit

Permalink
Merge pull request #875 from geek/truncate
Browse files Browse the repository at this point in the history
Revert console cov report truncation
  • Loading branch information
geek committed Nov 1, 2018
2 parents 54f841c + 2a3bc47 commit 477b0c7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions lib/reporters/console.js
Expand Up @@ -317,8 +317,6 @@ internals.Reporter.prototype.end = function (notebook) {
});

if (missingLines.length) {
const lineReportLimit = 8;

// Lines missing coverage are reported as a list of
// spans, e.g. "1, 3-8, 10, 13-15".
const missingLinesReport = [];
Expand Down Expand Up @@ -349,13 +347,6 @@ internals.Reporter.prototype.end = function (notebook) {
span.start = line;
span.end = line;
}

// If the report gets too long, truncate it.
if (missingLinesReport.length >= lineReportLimit) {
const remainingLines = missingLines.length - i;
missingLinesReport.push('and ' + remainingLines + ' more');
break;
}
}

output += yellow('\n' + file.filename + ' missing coverage on line(s): ' + missingLinesReport.join(', '));
Expand Down
2 changes: 1 addition & 1 deletion test/reporters.js
Expand Up @@ -852,7 +852,7 @@ describe('Reporter', () => {
const { output } = await Lab.report(script, { reporter: 'console', coverage: true, coveragePath: Path.join(__dirname, './coverage/console'), output: false });
expect(output).to.contain('Coverage: 64.86% (26/74)');
expect(output).to.contain('test/coverage/console.js missing coverage on line(s): 14, 17-19, 22, 23');
expect(output).to.contain('test/coverage/console-large-file.js missing coverage on line(s): 13, 17, 20, 25, 26, 29, 35-37, 40, and 10 more');
expect(output).to.contain('test/coverage/console-large-file.js missing coverage on line(s): 13, 17, 20, 25, 26, 29, 35-37, 40, 47-50, 53, 61-65');
expect(output).to.not.contain('console-full');
});

Expand Down

0 comments on commit 477b0c7

Please sign in to comment.