What this book covers
Chapter 1, First Steps with Test-Driven Development, introduces Jest and the TDD cycle.
Chapter 2, Rendering Lists and Detail Views, uses the TDD cycle to build a simple page displaying customer information.
Chapter 3, Refactoring the Test Suite, introduces some of the basic ways in which you can simplify tests.
Chapter 4, Test-Driving Data Input with React, covers using React component state to manage the display and saving of text input fields.
Chapter 5, Adding Complex Form Interactions, looks at a more complex form setup with dropdowns and radio buttons.
Chapter 6, Exploring Test Doubles, introduces various types of test doubles that are necessary for testing collaborating objects, and how to use them to test-drive form submission.
Chapter 7, Testing useEffect and Mocking Components, looks at using test doubles to fetch data when components are mounted, and how to use module mocks to block that behavior when testing parent components.
Chapter 8, Building an Application Component, ties everything together with a “root” component that threads together a user journey.
Chapter 9, Form Validation, continues with form building by adding client- and server-side validation and adding an indicator to show that data is being submitted.
Chapter 10, Filtering and Searching Data, shows how to build a search component with some complex interaction requirements, in addition to complex fetch request requirements.
Chapter 11, Test-Driving React Router, introduces the React Router library to simplify navigation within our user journeys.
Chapter 12, Test-Driving Redux, introduces Redux into our application.
Chapter 13, Test-Driving GraphQL, introduces the Relay library to communicate with a GraphQL endpoint that’s provided by our application backend.
Chapter 14, Building a Logo Interpreter, introduces a fun application that we will begin to explore by building out features across both React components and Redux middleware: undo/redo, persisting state across browser sessions with the LocalStorage
API, and programmatically managing field focus.
Chapter 15, Adding Animation, covers adding animations to our application using the browser requestAnimationFrame
API, all with a test-driven approach.
Chapter 16, Working with WebSockets, adds support for WebSocket communication with our application backend.
Chapter 17, Writing Your First Cucumber Test, introduces Cucumber and Puppeteer, which we will use to build BDD tests for existing functionality.
Chapter 18, Adding Features Guided by Cucumber Tests, integrates acceptance testing into our development process by first building BDD tests with Cucumber, before dropping down to unit tests.
Chapter 19, Understanding TDD in the Wider Testing Landscape, finishes the book by looking at how what you’ve learned fits in with other test and quality practices.