[HN Gopher] How I write unit tests in Go
___________________________________________________________________
How I write unit tests in Go
Author : badrequest
Score : 19 points
Date : 2024-04-10 15:49 UTC (7 hours ago)
(HTM) web link (blog.verygoodsoftwarenotvirus.ru)
(TXT) w3m dump (blog.verygoodsoftwarenotvirus.ru)
| jozvolskyef wrote:
| I would vote this down if I could for the following reasons:
|
| - I prefer state-based TDD as opposed to interaction-based (see
| https://martinfowler.com/articles/mocksArentStubs.html).
|
| - I've used both testcontainers and dockertest, and from my
| experience dockertest is more robust.
|
| - The capital T for the outer argument comes across as being
| hypercorrect. Why would one consider the shadowing of this
| argument bad?
| kromem wrote:
| Posts aren't gospel.
|
| It's perfectly ok to take what you like from them and leave the
| things you don't.
|
| Is something that has 7 useful things and 3 things you disagree
| with merited to be buried from public view because of the 3
| things you personally disagree with?
|
| I've never really understood this perspective.
___________________________________________________________________
(page generated 2024-04-10 23:01 UTC)