-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
node:test logs verbose feature #43574
Comments
Hi @mtsluna what type of logs do you refer to? do you have a code example to describe how such a log might look, or maybe a reference to a test runner (i.e mocha, jest,tap) that supports this? |
I think this could be kind of an interesting feature. Although, I'd suggest adding a cc @benjamingr |
@ErickWendel what logs would |
when we run node --tests we see the node tap output right? the --silent would be used on CI and actually omit all logs so if everything is going right it shouldn't show anything and exit with code 0 |
Hello @MoLow and @ErickWendel when you run jest test and you put the flag --silent=false, you can see all the logs in all levels in the test console. In this case in the node:test api you cant enable the logs, you only can view the results of the execution. |
@nodejs/test_runner @cjihrig |
I don't hate the idea of a quiet mode, but I do have two thoughts:
|
the tap output is still useful in the CI in case of a failure - users are usually interested at the specific failing test details
+1 on that, also reporting to a file instead of stdout will be much easier and might solve this usecase
this is probably out of scope - but we might want to introduce some kind of a |
+1 on that, it would greatly help sharing configuration outside of the project, although I see #44241 has already been implemented Another thought on that would be to check the |
I am strongly -1 to using |
Any particular reason? Just curious on the drawbacks that I might not have thought 😅 |
A few reasons:
|
I see! Thanks for the explanation. |
I don't see any usage of |
Not only console.log, I'm using |
@himself65 to be fair, |
I'm going to close this. Support for reporters just landed in a1b27b2, so you can customize the output how you'd like. |
What is the problem this feature will solve?
This feature solve the problem to turn on and turn off the logs (info/warn/error/log/etc) in the testing runner (node 18)
What is the feature you are proposing to solve the problem?
Add a simple flag in the node commands that allow to turn on the logs in combination of the next command:
node --test --verbose with the testing runner in node 18.
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: