-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Add a common.log for tests #9314
Comments
see comments:
|
|
Why not just encourage use of https://nodejs.org/api/util.html#util_util_debuglog_section with a section of Every time I write a new test, or repair an existing test, I add a bunch of console log statements in... and then I remove them before PRing the tests to node. Seems a shame. |
I guess there's always a balance, but I'd say that for me a console.log (or I guess a Using the existing debuglog in a |
I'm unclear right now, does |
@Fishrock123 Right now you don't get stdout or stderr if the test passes. You do get it if the test fails. I agree that what we really need is a way of setting how much output you want. |
@gibfahn would you like to pursue this? |
I would suggest monkey patching
|
What's the advantage over creating a
Sorry, missed this. I'd like to get round to this at some point, but it's been requested by plenty of people, so if someone else gets to it first that's fine by me. |
Yep, changed my mind. |
This issue is labeled |
I think it's worth leaving this open as something someone could pick up at some point. |
Enable logs by setting the `DEBUG` environment variable, or by passing `--log` or `-l` to the script. Could probably be enhanced to send logs somewhere other than stdout, but I haven't found a need for that yet. Fixes: nodejs#9314
@gibfahn I would like to work on it. Can you please mentor on this |
Is someone still working on this? |
Can you mentor me on this? |
There's no movement on this, there's no conclusion this is desired and there's no real movement. I think this should be closed unless someone can put some momentum behind it. |
It's come up a couple of times so far, so it's probably time for a proper discussion on the use of
console.log
in tests (i.e. should tests have anyconsole.log
output, and if so, when).The text was updated successfully, but these errors were encountered: