DEV Community

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

Collapse
 
ashleyjsheridan profile image
Ashley Sheridan

I think sometimes TDD gets confused with ensuring good unit test coverage. True TDD means writing the tests before the actual code, something I admit I've never been a fan of or managed to get into the practice of doing. However, I am a fan of good (meaningful) test coverage, I just write tests after writing the code.

I think after a while of writing tests, you end up learning how to write code that's more testable as a matter of course.