You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: a console.debug line, the actual output, an empty line, a source code location, and another empty line for good measure. Use N console.logs 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:
馃殌 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: