You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, while giving this library a try, I noticed that it wouldn't output colored diffs when using cargo-next as a test runner (which otherwise works fine with pretty_assertions).
cargo nextest run with similar-asserts:
cargo nextest run with pretty_assertions:
cargo test works fine too (unsurprisingly):
Since cargo-nextest is a popular test runner, is there anything we can do to get colored output with it too?
The text was updated successfully, but these errors were encountered:
Hi, main author of nextest here. The problem is that the output is captured, and since similar-asserts (correctly) thinks this isn't a tty so doesn't output color.
The usual way to handle this is with CLICOLOR_FORCE. Nextest could set that env var, but my concern with it being set that is that it would break tests which execute subprocesses of their own and depend on the output not containing colors (in fact, the nextest repo itself has some tests which work that way.)
Nextest could in principle set its own NEXTEST_COLOR=1 and =0 variable to indicate whether test utilities like similar-asserts should produce colored output. Would that work? @mitsuhiko's opinion would be really valuable here.
Hey, while giving this library a try, I noticed that it wouldn't output colored diffs when using cargo-next as a test runner (which otherwise works fine with pretty_assertions).
cargo nextest run
with similar-asserts:cargo nextest run
with pretty_assertions:cargo test
works fine too (unsurprisingly):Since cargo-nextest is a popular test runner, is there anything we can do to get colored output with it too?
The text was updated successfully, but these errors were encountered: