Confusing red color for my custom runner
See original GitHub issueš Bug Report
If your jest runner hashes to an unfortunate value, its test suites are marked with a red badge that at first glance looks like they are failing. I spent an hour trying to figure out what about my tests was failing.
To Reproduce
Have a runner named something that hashes to āredā from https://github.com/facebook/jest/blob/master/packages/jest-config/src/color.ts#L21
Expected behavior
I donāt think a test runner should show me red text unless something went wrong.
I can send a PR that removes red, green, and yellow from the colors that the test runner can hash, as each of those colors imply something about the tests. However that greatly increases the chances that two test runners will collide with the same color.
Through this Iāve learned about setting displayName: {color, name}, which is really cool. But this override is required by everyone that uses my runner, otherwise they will get a scary red name. Iād have to add a line about it in the docs. Iād rather just tweak my name until it hashes to cyan. If I could set the color from the runner itself that would be cool.
Maybe it would be simplest to just have one color for non-default runners? Or leave everything white by default?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6

Top Related StackOverflow Question
We could add black and gray instead, but Iām a bit sad that the color vibrance that people get by default will go away. Is the output really that bad? You get a red/green-background all-caps PASS/FAIL right next to the display name.
Re runner default colors, makes sense to me. I guess this would be taken from something
require('runnerPath').coloror so.This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.