question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
jeysalcommented, Apr 16, 2020

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').color or so.

0reactions
github-actions[bot]commented, Oct 9, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

36 Southwestern Table Runner Reversible Orange Red and - Etsy ...
This table runner comes in 2 color ways either turquoise or dark red....both with a turquoise backing. Choose either turquoise, rust/orange, dark red...
Read more >
#444 #1 Cause of Confusion in Runners - DOC
Today, on the Doc On The Run Podcast, we're talking about the number one cause of confusion in injured runners.
Read more >
Color Vision Confusion
At the back of our eyes there are cones (blue, red, and green) that pick up color and rods that pick up brightness....
Read more >
How to Use Color Blind Friendly Palettes to Make Your Charts ...
According to Colblindor, 99% of all color blind people suffer from red/green color blindness. This is further broken down into two distinctĀ ...
Read more >
The fundamentals of understanding color theory - 99Designs
Artists and designers still use it to develop color harmonies, mixing and palettes. The color wheel consists of three primary colors (red, yellow,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found