jest-html-reporters icon indicating copy to clipboard operation
jest-html-reporters copied to clipboard

Text colorization missing when built on GitLab

Open smith558 opened this issue 2 years ago • 3 comments

when built locally image when built on GitLab image

smith558 avatar Jun 29 '22 20:06 smith558

Hi @smith558 , that's interesting, I didn't do anything special regarding Gitlab, don't know why the styles were not working. I guess there are some CSS conflicts with GitLab default CSS.

Maybe you can inspect Gitlab the report file to say why it does not take effect?

Hazyzh avatar Jul 03 '22 03:07 Hazyzh

In fact, it's not that CSS would not take effect. It's something regarding the Jest output and how it's passed onto the HTML builder. It's passed as a pure text block when built on GitLab in contrast with when built locally and the output is HTML formatted and styled elements.

when built locally:

Expected: <span style="color:#0A0">0<span style="color:#595959">
Received: <span style="color:#A00">-2<span style="color:#595959">

image

built on GitLab: image

smith558 avatar Jul 03 '22 16:07 smith558

Interesting, seems you don't get colorful output on your gitlab machine. I guess this issue not related to the report, it's maybe a bug of Jest. https://github.com/facebook/jest/issues/9459

Hazyzh avatar Jul 04 '22 13:07 Hazyzh