Skip to content

Commit

Permalink
lib: changed the colors of X's and .'s in test_runner dot reporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan Chadha committed Mar 31, 2024
1 parent 9efc84a commit 5e96c1e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/internal/test_runner/reporter/dot.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
'use strict';
const { MathMax } = primordials;
const { red, green, clear } = require('././util/colors.js');

module.exports = async function* dot(source) {
let count = 0;
let columns = getLineLength();
for await (const { type } of source) {
if (type === 'test:pass') {
yield '.';
yield '${colors.green}.${colors.reset}';
}
if (type === 'test:fail') {
yield 'X';
yield '${colors.red}X${colors.reset}';
}
if ((type === 'test:fail' || type === 'test:pass') && ++count === columns) {
yield '\n';
Expand Down

0 comments on commit 5e96c1e

Please sign in to comment.