DEV Community

Discussion on: What are your thoughts on testing and TDD?

Collapse
 
jaedle profile image
jaedle • Edited

I kindly disagree: The tests should not affect the implementation.

I use TDD all the time (on my job and 90% of my hobby projects) and the most I think I like about it:
the structure of the test can be completely decoupled from the structure of the implementation:
Maybe the test has 2 classes, but the implementation has 1, 2 or even 15. I always test the outside behavior of the module, never private details.