TDD Basics - adoxic/alchemy-fsjs-fall-2019 GitHub Wiki

TDD is test driven development. It means creating tests for functions that check if they work. By testing first instead of waiting till something fails just as you are running along you fallowing the saying fail fast fail early. This means failing right away so you know what piece is broken instead of tripping over it later and then desperately trying to find wtf is failing.

By taking a test first approach you check each function is doing what you intended first. There are still bugs but they are easier to narrow down where the problems could be. Also by doing tests first you have to think first about exactly what you want your function to do so you write better code.