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

Mocha colored-reporters support #162

Open
marc2332 opened this issue Aug 24, 2020 · 4 comments
Open

Mocha colored-reporters support #162

marc2332 opened this issue Aug 24, 2020 · 4 comments

Comments

@marc2332
Copy link
Contributor

I have been trying for my self, but I can't get working any colored mocha reporter, I mean, it displays the text, but not the colors.

I know electron-mocha uses https://nodejs.org/dist/latest-v12.x/docs/api/console.html to print in to the main process, but it doesn't print the colors.

Any thoughts on this?

@inukshuk
Copy link
Collaborator

What Terminal do you use? I have no issues getting colored output from mocha reporters using various Terminals on Linux, Mac OS and Windows. The CI reports of the project also have colors on all three platforms.

@marc2332
Copy link
Contributor Author

marc2332 commented Aug 25, 2020

I am using Windows Terminal Preview ( I have also tried with CMD ).

Here is a project using mocha directly:

imagen

And here my project using electron-mocha:

imagen

Both of them use the same reporter, but with electron-mocha, it doesn't output the colors, I have also tried other themes and happens the same.

My project is https://github.com/Graviton-Code-Editor/Graviton-App in case you want to try it by yourself

@xmedeko
Copy link

xmedeko commented Mar 24, 2021

It's probably bug of Electron on Windows, see electron/electron#15727 (closed) and electron/electron#27170 (active).

@julianhille
Copy link
Contributor

i've got the same locally on linux. No colors.

when printing exports.useColors from mocha it says true, but when looking at exports.useColors in the color function (just before test reporter output) it is false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants