Why Use Test-Driven Development
Explore the principles of test-driven development (TDD) and understand how writing tests first can improve your React coding process. Learn to use Jest to catch issues early and iterate quickly with practical examples like the Fizz Buzz challenge.
We'll cover the following...
Test-driven development uses
Test-driven development (TDD) is sometimes defined as writing tests first. Although that’s an important part of the methodology, it’s not the essence. The essence of TDD is rapid iteration. You’ll find that you learn more quickly from iterating than you would from trying to plan out a complex program from the ground up. You’ll discover bad assumptions and potential pitfalls before you invest too much work. And you’ll find the process more enjoyable. It’s a smooth, incremental progression rather than an alternation between bursts of inspiration and plateaus of “What do I do next?”
The project for this chapter will be a solver for ...