Mix test hides console output text with black on black colorization?

While working on my unit tests running mix test I got this failure:

I selected the failure information to copy and paste it to a text editor for reference later and I saw this:

So apparently mix test is colorizing the line of the test that fails as black on black? Do I have a setting wrong, or is this an unfortunate choice of colors by the testing infrastructure?

2 Likes

I’d say the issue is with your setup. That line uses black with the bright modifier. Try this in your terminal:

IO.puts("#{IO.ANSI.black()}#{IO.ANSI.bright()}Hello darkness my old friend")
3 Likes

Thank you, you’re correct. I’m using the Mac default Terminal app, using one of the default profiles (Homebrew). A few of the profiles have black and “bright black” display as identical colors when the background is black. I imagine others may accidentally choose one of these profiles and miss that important line in their test output.

Sorry to resurrect this 3 year old thread, but this came up for me again, and maybe someone could use this information. I switched my neovim theme to ‘tokyonight’, a fairly popular theme, and it colors bright_black nearly completely black which is invisible against its black background. To fix it you can use the plugins’ options to turn off terminal coloring. There are other ways too, like manually setting it to some other color.

I continue to wonder if bright_black was a good choice for coloring important text in test output.

1 Like