DEV Community

Discussion on: The laws of TDD

 
hsalem profile image
Hassan

That is a great question. The reason behind tdd, or tests in general is to ensure your logic works as expected all the time. And that is why it makes you faster, because its all about confidence.
So for me, the answer is yes I test all business logic. If it is simple then its test will be very very easy but you will ensure that your product works as expected all the time.
And another benifit I notice is that if you are reading a code you wrote long time ago or other people code, its easier to start from tests, because the have to be easy and you can easly spot the inputs and outputs of your component.