DEV Community

Discussion on: Why I Love TDD

Collapse
 
hallsamuel90 profile image
Sam Hall • Edited

A few months ago, I switched to a project that had a required code coverage metric (never wrote tests for the other projects).

At first I was writing the tests after the fact. By doing this, it was almost impossibe to test some functionality and it always felt like a chore.

Fast forward to today and I am following a tdd approach and it has drastically improved the cleanliness and quality of my code. It's also a great feeling being confident that your code 'works' by the time you complete a feature.

+1 for tdd.