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

console.log doesn't interpret %c format option. #3010

Closed
clozr opened this issue Feb 26, 2017 · 6 comments
Closed

console.log doesn't interpret %c format option. #3010

clozr opened this issue Feb 26, 2017 · 6 comments

Comments

@clozr
Copy link

clozr commented Feb 26, 2017

When running in jest, the %c in console.logs are not properly handled and treated as just string. Therefore corresponding style argument is not correctly consumed leading to different console output. Any idea how to fix it.

@thymikee
Copy link
Collaborator

We're emulating console, and this may not work, but I hadn't check myself. Would you mind sending a PR with a fix? :)

@thymikee
Copy link
Collaborator

So I've had a look now and console features like %d or %s are working just fine with Jest. But FWIW, %c is not a part of Console in Node. Seems like this is only available in browsers, so I'd say it's a wontfix.

@clozr
Copy link
Author

clozr commented Feb 27, 2017 via email

@thymikee thymikee reopened this Feb 27, 2017
@clozr
Copy link
Author

clozr commented Feb 27, 2017

Thanks a lot for reopening. React/React-Native debugging uses lots of advanced console features. I will slowly start adding more to the console.log emulation...starting with %c support.

@cpojer
Copy link
Member

cpojer commented Apr 13, 2017

This should be done in nodejs directly: nodejs/node#10308

@cpojer cpojer closed this as completed Apr 13, 2017
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants