Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Well explain further. I hate these smart arse sounding comments - "you are doing it wrong" without any indication why, or how to do it better.

With unit tests, there are certain things that must be tested, such as very high-value code contracts, and the like. There are many things that people test (like "correct output" for the input) which may not be so valuable, particularly if several possible values may be correct.

So test contracts, not internals, and not representation. And please for the heaven's sake, don't test the behavior of your dependencies.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: