Repository navigation
assert colors don’t match test colors #52249
Copy link
Copy link
Closed
Labels
assertIssues and PRs related to the assert subsystem.Issues and PRs related to the assert subsystem.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
Description
Activity
This could be a duplicate of #50397, but I have not confirmed it.
Reacted by Moshe Atlow- addedassertIssues and PRs related to the assert subsystem.Issues and PRs related to the assert subsystem.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.
on Mar 30, 2024 @pmarchini was this issue fixed by your work in #55404?
@cjihrig it should be addressed.
I'll take a look to ensure I'm not mistaken, and if not, I'll close the issue!Looking at #55404, it looks like that change was released in v23.1.0 and has not been backported to the v22 release line.
Reacted by Pietro Marchini and Remco HaszingIMO a backport would be nice, but definitely not critical. I look forward to seeing this change in a near future. Thanks for fixing this! ❤️
Metadata
Metadata
Assignees
Labels
assertIssues and PRs related to the assert subsystem.Issues and PRs related to the assert subsystem.test_runnerIssues and PRs related to the test runner subsystem.Issues and PRs related to the test runner subsystem.


Version
v20.12.0
Platform
Linux vali 6.8.0-76060800daily20240311-generic #202403110203
171019808822.04~1a3dbc7 SMP PREEMPT_DYNAMIC Mon M x86_64 x86_64 x86_64 GNU/LinuxSubsystem
assert
What steps will reproduce the bug?
Create an empty directory with the following file named
test.mjs:Now run the following:
How often does it reproduce? Is there a required condition?
In my experience always.
What is the expected behavior? Why is that the expected behavior?
I expected the assertion error to always be colorful, at least if the rest of the test output is.
What do you see instead?
The assertion error is colorful when running a test script directly, but not when it’s run via
node --test.Additional information
Potentially related environment variables from my desktop session:
From a Docker container: