Hacker News new | ask | show | jobs
by TickleSteve 2772 days ago
In general, I test those things that relate to the application, not those about the implementation.

i.e. Test business logic edge-cases, don't test a linked-list implementation... that's just locking your design in.

2 comments

Writing functional tests is easy when you have a clear spec. If you do, tests are basically the expression of that spec in code. Conversely, if they're hard to write, that means that your spec is underspecified or otherwise deficient (and then, as a developer, ideally, you go bug the product manager to fix that).
Right, like I said "complicated business logic". I agree completely, I have no desire to test a library or framework (unless it's proven to need it).