-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Added a verbose flag which makes gotestdox print the output of tests. #13
Conversation
Thanks, @Jumziey! It's maybe worth reviewing this discussion on issue #4:
That said, I've noticed that a lot of people seem to like using
|
Thanks for the quick response! Yeah I understand if you have a different purpose for the tool and this PR really does not seem to fit into it. It's a neat idea to let the tests print the output in the way you describe. I don't see how you could only get the failure message for the failing test without wrapping it in some tooling specific way, but just by default printing the output when the test is failing is a really good idea! On the subject of purpose there's some real social/organizational benifits of having the same tools you develop with being the tool that reports successes in CI pipelines and the like, so hope you might reconsider this in the future :) (not to mention I personally like it, which personally I find most important ;p) Really like what you've done here! 💪 I'll close this PR and continue on my own fork in the mean time, but feel free to reach out whenever :) |
Maybe a good compromise would be to add support for the |
I hadn't even considered it, thank you for the input! I'll look into that. |
@Jumziey notwithstanding adding |
Yeah I've actually added dox format on my own fork and are trying it out a bit before doing a PR, I'm still a bit unsure in what way the I looked into the change and I liked it :) I still think it scans better having the filename/number on a different line then the output, especially if its run in a small terminal/window etc. But this does not seem to map to the philosophy of |
@bitfield I was just about to set out looking into this again and to my suprise you've done an amazing work getting the testdox format into gotestsum already (gotestyourself/gotestsum#359). Thanks! Really appreciate it ^^ |
Just recently found this little gem, really makes it way more fun to code and easier to to make focused test cases.
One issue I had though is that I usually only develop with tests and the outputs from the code and tests weren't displaying when running the tests. Which is essential when you hit a snag and want to debug. One alternative is to just go back to the good ol'
go test
tool withoutgotestdox
, but that isn't as easy and pretty to parse at a glance and hides the test name in that TestCamelCase.So I added a
-v
flag that behaves similarly togo test -v
.I like feedback in any form so go ham if you'd like, lived on the internet for too long to get offended, even if you don't like the concept to begin with.