playwright-test icon indicating copy to clipboard operation
playwright-test copied to clipboard

Disable emojis/colour when CI env var is set

Open achingbrain opened this issue 2 years ago • 2 comments

CI logging output can be really hard to read:

\x1B[0m\x1B[0m\n'
 \x1B[0m  ping test\x1B[0m\n'
   \x1B[36m  - should listen for ping\x1B[0m\n'

Some CI logging setups handle this well, some do not - the above is a browser test running in a docker image on GitHub CI so I think it's actually Docker which is mangling the output, at any rate it's full of garbage.

It would be better to disable all the fancy formatting when the process.env.CI env var is set. Some runners do this automatically (e.g. mocha) but others don't (playwright?).

achingbrain avatar Jul 05 '23 07:07 achingbrain

which test runner are you using ? can you post a link to that run please

hugomrdias avatar Jul 06 '23 12:07 hugomrdias

They are mocha tests run in a browser via playwright test, running on Docker.

Here's an example run: https://github.com/libp2p/js-libp2p/actions/runs/5465156410/job/14796171888

achingbrain avatar Jul 26 '23 17:07 achingbrain