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

The default colored console output is unreadable #162

Closed
jwarkentin opened this issue May 20, 2023 · 0 comments · Fixed by #164
Closed

The default colored console output is unreadable #162

jwarkentin opened this issue May 20, 2023 · 0 comments · Fixed by #164
Assignees
Labels

Comments

@jwarkentin
Copy link

jwarkentin commented May 20, 2023

When run in a console that supports colors (which is most these days), Jest will output the necessary escape sequences to color the output. That isn't getting stripped or interpreted in the HTML output at the moment which makes output like the following completely unreadable:

Error: [2mexpect([22m[31mreceived[39m[2m).[22mtoHaveLength[2m([22m[32mexpected[39m[2m)[22m

Expected length: [32m4[39m
Received length: [31m0[39m
Received array:  [31m[][39m

A simple way to solve this would be with a library that can convert the colors to HTML or strip them completely, such as this one which can do either. This could be a configurable option as well.

@Hargne Hargne self-assigned this May 20, 2023
@Hargne Hargne added the bug label May 20, 2023
@Hargne Hargne closed this as completed May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants