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

The TDD style bottom-up approach can be handy too. On a recent project I write most of the tests first, to consider the API before implementation. These should come in handy when future developers join the codebase and need to understand the intended behavior of these components.


Would a future developer care if you wrote your tests before or after the API was implemented?


Actually yes, it's really hard to write a test without mocking for an existing (non-pure) API.




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

Search: