Color output
Summary
If TESTIFY_COLOR=true is in the environment, then expected and actual values will be coloured in green and red respectively.
Motivation
Stolen from #994:
- @boyan-soubachov says "It's an interesting idea."
- @mvdkleijn says "I like this idea."
Unlike #994, this PR is configured once for the whole run by setting an environment variable.
Related issues
- Closes #946
- Related to #994
@boyan-soubachov could you have a look at this?
@alxn you had opinions on the sibling PR which should not be an issue with this one.
Do you think this one would work?
Using an env-var to turn it on seems fine. At a later date someone can try to do the isatty check.
Any updates?
Any updates?
Not sure who you are asking here @vegerot, but the next step here is getting a review from some project maintainer.
Looking at the most recent merges, maintainers include:
- @boyan-soubachov
- @mvdkleijn
While I understand the concerns about portability, file redirection, etc., it feels like all the other test runners I know (GoogleTest, Jest, Deno Test, ScalaTest, XCTest, etc.) all show colors when appropriate (jest does mess up sometimes when piping into other programs).
While I know this is a tricky problem to solve, it is definitely not intractable given these other frameworks
I think leaving this open doesn't provide any value, closing.
Feel free to reopen if a reviewer becomes available!