Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test runner coverage thresholds must show up in red #4504

Open
nicholaswmin opened this issue Nov 18, 2024 · 1 comment
Open

Test runner coverage thresholds must show up in red #4504

nicholaswmin opened this issue Nov 18, 2024 · 1 comment
Assignees

Comments

@nicholaswmin
Copy link

nicholaswmin commented Nov 18, 2024

  • since v22.8

Subsystem

Test Runner, all OS, all versions

Description

Another small visual tweak.

The spec reporter must show errors on coverage thresholds in red.1
As it is right now, visually - it looks like the tests pass.

I can imagine it can create a lot of back/forth in code reviews.

You'll only realise there's a problem when the CI cycle fails because it correctly exits 1. That sucks because debugging in CI is as pleasant as watching paint dry.

I'm talking about the last line of this:

ℹ duration_ms 60.134125
ℹ start of coverage report
ℹ test/exceptions.test.js | 100.00 |   100.00 |  100.00 | 
ℹ ------------------------------------------------------------------------
ℹ all files               | 100.00 |   100.00 |   95.08 |
ℹ ------------------------------------------------------------------------
ℹ end of coverage report
ℹ Error: 95.08% function coverage does not meet threshold of 100%. <-- this must be more pronounced. It's in blue right now.

here's how it really looks:

screenshot of coverage report showing errors in blue colour

Minimal Reproduction

node --test foo.test.js --experimental-test-coverage --test-coverage-lines=100

Output

No response

Footnotes

  1. I'm aware of the accesibility concerns about using color, not sure how it's dealt or if at all.

@RedYetiDev RedYetiDev self-assigned this Nov 18, 2024
@RedYetiDev
Copy link
Member

SGTM, I'll open a PR in a few hours

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants