Skip to content

[Bug]: snapshot diff colors are unreadable in GitLab CI #15957

@jakub-g

Description

@jakub-g

Version

30.2.0

Steps to reproduce

Have a snapshot test that fails.

Expected behavior

It should also render readable colors in Gitlab CI.

Actual behavior

When ran on Gitlab CI, it renders unreadable colors.

Image

Environment

GitLab CE 17.8.7

(It's been like this for years, nothing new)

Additional context

After some debugging, this is because chalk detects GitLab to be "level 1" color support, so the code paths are those:

The problem is, GitLab for some reason doesn't properly render certain color combinations:

  • c.bgWhiteBright.<someFgColor> never renders white bg
  • c.<someFgColor>.bgBrightWhite always renders white-on-white

I'll get back to this once I have more bandwidth.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions