|
|
|
Ask HN: What kind of tests do you write for your side projects?
|
|
4 points
by antholeole
1599 days ago
|
|
I have a hobby side project, which I’m quite close to shipping. I started off going for 90% unit tests, but since I’m hacking alone, it ends up taking a bunch of time to keep the tests up to date. Im thinking of keeping all the old unit tests, but switching to a full integration E2E testing system. This way, I can just text features as opposed to code paths. By day I work at <insert tech giant here>, and I would never push up code without it being unit tested, so it feels a little painful to ship with only integration tests. Thoughts? For those of you who’ve shipped small projects, what tests did you find had the most benefit? |
|
This can annoy folks, but the straight forward truth is that integration tests cover the unit as well as the whole, so if time is limited, they should 100% be the priority as they bring more value.
That said, I love making sure that my code is well unit tested and I build TDD where I can to make that happen. Im not dismissing the value of unit tests, but when you have to make a choice, for me, Integration tests win.