node
node copied to clipboard
fix: make-colored dot reporter more readable
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
Review requested:
- [ ] @nodejs/test_runner
please amend first commit message. other than that LGTM
@bantoinese83 do you need help squashing/amending the first commit message?
Yes, I definitely need help squashing/amending the first commit message. Thank you, @MoLow!
CI: https://ci.nodejs.org/job/node-test-pull-request/57198/
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