Skip to content

Test runner coverage thresholds must show up in red #4504

Closed as not planned
Closed as not planned
@nicholaswmin

Description

@nicholaswmin
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions