-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Duplicate t.log when test fails #2963
Comments
Yes, I agree. I think the log doesn't need to be printed two times. Or maybe there is any other reason of printing the log with the failure after the test finished? @novemberborn |
The logs could be useful for understanding why the test failed though. I wonder if, for failing tests, we shouldn't print them as test results come in but only at the end — and for passing tests we print them along with the passing test (since those are not repeated at the end). |
Either way will work, as long as there are no duplicates on failed tests. I would argue that, for consistency, you should only show them along with the test for both passing and failing tests. |
Yea sounds good. PR welcome 😄 |
@novemberborn I would like to work on this issue if its okay. |
@santhoshbala0178 of course! |
@novemberborn, Could you please point me to the documentation on how to set up and test the changes locally, if it is possible please.? |
Use Node.js 16 or 17, |
I'm running
ava
v4.0.1, without any configuration.Running the following code, outputs
t.log
twice on the console. Is there a reason for this?This is the output:
What I'm expecting to see is the log on the first part (where the test failed) but not on the second part (under the horizontal "line").
From my understanding, the second part of the output should just give details on why the test failed, there's no need to output the logs again.
This is extremely annoying when you're trying to
t.log
something longer than a couple of lines and your screen is flooded with duplicate text.The text was updated successfully, but these errors were encountered: