Hacker News new | ask | show | jobs
by commandersaki 138 days ago
My opinion is unit tests where you can easily craft inputs and check outputs.

If that becomes hard or you find yourself mocking a lot, then stop, and instead write integration and e2e tests.

Remember unit tests get tightly coupled to your code base, so use them wisely.