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

Options to prevent tweaking console.{log|debug}? #10846

Open
elibarzilay opened this issue Nov 18, 2020 · 7 comments
Open

Options to prevent tweaking console.{log|debug}? #10846

elibarzilay opened this issue Nov 18, 2020 · 7 comments

Comments

@elibarzilay
Copy link

elibarzilay commented Nov 18, 2020

🚀 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: 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).

@github-actions
Copy link

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.

@github-actions github-actions bot added the Stale label Feb 25, 2022
@elibarzilay
Copy link
Author

activity

@github-actions github-actions bot removed the Stale label Feb 25, 2022
@JESii
Copy link

JESii commented Sep 9, 2022

activity

@github-actions
Copy link

github-actions bot commented Sep 9, 2023

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.

@github-actions github-actions bot added the Stale label Sep 9, 2023
@Grundlefleck
Copy link

activity

@github-actions github-actions bot removed the Stale label Sep 10, 2023
Copy link

github-actions bot commented Sep 9, 2024

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.

@github-actions github-actions bot added the Stale label Sep 9, 2024
@JESii
Copy link

JESii commented Sep 9, 2024

This needs a fix

@github-actions github-actions bot removed the Stale label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants