© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
J. QiuTest-Driven Development with Reacthttps://doi.org/10.1007/978-1-4842-6972-5_3

3. Test-Driven Development 101

Juntao Qiu1  
(1)
Burwood East, 3151, Victoria, Australia
 

In this chapter, we will learn how to apply TDD in our daily development routine through a step-by-step guide. Along with this demo, you will get an idea of how to split a big task into relatively smaller ones and complete each one with a set of passing tests while learning some refactoring techniques. Before we dive into the code, let’s get a fundamental understanding of how to write a proper test.

Writing Tests

So how would you start to write a test? Typically, there are three steps (as ...

Get Test-Driven Development with React: Apply Test-Driven Development in Your Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.