DEV Community

Discussion on: What were your problems with "real world TDD"?

Collapse
 
jorinvo profile image
jorin

Writing tests after you are done writing the code is always a pain.
If you can, write tests first. It makes you think about the API upfront. The code will not only be easier to test but also easier to reason about. And you have to do less manual testing since you have the automated tests ready. It also feels much more rewarding making the tests pass little by little than treating them as an afterthought.