DEV Community

HelpMichaelCode
HelpMichaelCode

Posted on

Red, Green and Refactor in TDD

I’m new to this concept of TDD and usually what other developers would do is write up their functionality and write up a unit test afterwards. My question is, what’s the difference between writing test first following the red, green and refactor pattern and writing code first then testing it.

Top comments (2)

Collapse
 
vlasales profile image
Vlastimil Pospichal • Edited

codecademy.com/articles/tdd-red-gr...

Test specify what you need. Must be first.

Collapse
 
helpmichaelcode profile image
HelpMichaelCode

Thanks for replying and that article link you attached was helpful!