Skip to content

Commit a382307

Browse files
committed
test_runner: remove console.logs and fix lint errors
1 parent 85e4ba5 commit a382307

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

lib/internal/test_runner/coverage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ class TestCoverage {
190190
ArrayPrototypePush(functionReports, {
191191
__proto__: null,
192192
name: functions[j].functionName,
193-
count: MathMax(...ArrayPrototypeMap(ranges, r => r.count)),
193+
count: MathMax(...ArrayPrototypeMap(ranges, (r) => r.count)),
194194
line: range.lines[0].line,
195195
});
196196

@@ -215,7 +215,7 @@ class TestCoverage {
215215
__proto__: null,
216216
line: line.line,
217217
count: line.count,
218-
})
218+
});
219219
}
220220
} else {
221221
ArrayPrototypePush(lineReports, {

lib/internal/test_runner/utils.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ const {
3535
kIsNodeError,
3636
} = require('internal/errors');
3737
const { compose } = require('stream');
38-
const console = require('console');
3938

4039
const coverageColors = {
4140
__proto__: null,
@@ -300,7 +299,7 @@ function formatLinesToRanges(values) {
300299
}
301300

302301
function getUncoveredLines(lines) {
303-
return ArrayPrototypeFlatMap(lines, (line) => line.count === 0 ? line.line : []);
302+
return ArrayPrototypeFlatMap(lines, (line) => (line.count === 0 ? line.line : []));
304303
}
305304

306305
function formatUncoveredLines(lines, table) {
@@ -332,7 +331,7 @@ function getCoverageReport(pad, summary, symbol, color, table) {
332331
const columnsWidth = ArrayPrototypeReduce(columnPadLengths, (acc, columnPadLength) => acc + columnPadLength + 3, 0);
333332

334333
uncoveredLinesPadLength = table && ArrayPrototypeReduce(summary.files, (acc, file) => {
335-
return MathMax(acc, formatUncoveredLines(getUncoveredLines(file.lines), table).length)
334+
return MathMax(acc, formatUncoveredLines(getUncoveredLines(file.lines), table).length);
336335
}, 0);
337336
uncoveredLinesPadLength = MathMax(uncoveredLinesPadLength, 'uncovered lines'.length);
338337
const uncoveredLinesWidth = uncoveredLinesPadLength + 2;

test/parallel/test-runner-coverage.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,6 @@ test('test tap coverage reporter', skipIfNoInspector, async (t) => {
8989
const result = spawnSync(process.execPath, args, options);
9090
const report = getTapCoverageFixtureReport();
9191

92-
console.log("=======")
93-
console.log("RESULT\n", result.stdout.toString())
94-
console.log("EXPECTED\n", report)
95-
console.log("=======")
96-
9792
assert(result.stdout.toString().includes(report));
9893
assert.strictEqual(result.stderr.toString(), '');
9994
assert.strictEqual(result.status, 0);

0 commit comments

Comments
 (0)