-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Options to prevent tweaking console.{log|debug}
?
#10846
Comments
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 14 days. |
activity |
activity |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
activity |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
This needs a fix |
🚀 Feature Proposal
Have a command line flag / config option to avoid touching
console.{log|debug}
Motivation
Debugging via console output is often very useful.
Pitch
(This is possibly something that is possible, though I found nothing at all, not on the web and not when asking people.)
I often use
console.log
etc to debug code. Should be obvious why it's useful. But for each output, jest shows: aconsole.debug
line, the actual output, an empty line, a source code location, and another empty line for good measure. Use Nconsole.log
s with M tests, and you have an output messy enough to be either useless or make you go through cumbersome grep/emacs/etc gymnastics.When trying to see if there's an existing way to get just the output, all I found was some useless SO answers, and #8819 (leading to #9741) which apparently made it worse by adding a separate line for the source location.
I got the vague impression that I can achieve that with a custom reporter, or more test code or whatever -- but I'm just debugging something else, I want to just run it with sane output temporarily while I'm debugging; I don't want to change the test output permanently, and I certainly don't want to diverge into a mini side-project of writing jest code for the occasional debugging need. I also don't want to use an interactive debugger (I have a bunch of similar tests, and I want to eyeball all of them on a single screen rather than stepping through each and every one).
The text was updated successfully, but these errors were encountered: