node icon indicating copy to clipboard operation
node copied to clipboard

fix: make-colored dot reporter more readable

Open bantoinese83 opened this issue 1 year ago • 1 comments

fix(test_runner): improve colored dot reporter readability

In this commit, I've enhanced the colored dot reporter for the Node.js test runner. Now, passing test dots are displayed in bold and bright green, while failing test 'X's are in bold and bright red, making the output more visually distinct and readable.

Changes made:

  • Updated the dot reporter to utilize ANSI escape codes for bold and bright colors.
  • Improved the styling of dots and 'X' to enhance visibility.

Tested the changes locally with the provided test script to ensure the proper functioning of the updated dot reporter.

Closes #51770

bantoinese83 avatar Feb 16 '24 01:02 bantoinese83

Review requested:

  • [ ] @nodejs/test_runner

nodejs-github-bot avatar Feb 16 '24 01:02 nodejs-github-bot

please amend first commit message. other than that LGTM

MoLow avatar Feb 18 '24 07:02 MoLow

@bantoinese83 do you need help squashing/amending the first commit message?

MoLow avatar Feb 18 '24 14:02 MoLow

Yes, I definitely need help squashing/amending the first commit message. Thank you, @MoLow!

bantoinese83 avatar Feb 18 '24 14:02 bantoinese83

CI: https://ci.nodejs.org/job/node-test-pull-request/57198/

nodejs-github-bot avatar Feb 20 '24 11:02 nodejs-github-bot

Please add a test + I think it should not colorize the characters when not TTY...

@rluvaton It seems the CI failed due to the changes - so I think we don't need to add another tests (only fix the broken ones..) In addition, this will only have affect on TTY (or when FORCE_COLOR is set) https://github.com/nodejs/node/blob/db7d22dd700d826e7a4d153c276f6e127db847e5/lib/internal/util/colors.js#L17-L27

atlowChemi avatar Feb 21 '24 20:02 atlowChemi