Outside-In React Development
A TDD Primer
About the Book
How should we decide what kinds of tests to write for our React applications, and how many of each kind? How can we write a test suite that gives us confidence rather than just giving us busywork? Instead of tests slowing down our development, could they actually help us go faster?
Outside-In React Development tackles these questions by applying the practice of outside-in test-driven development (TDD) to React applications. It explains the problems that agile software development solves, the key role that test-driven development plays, and the way outside-in test-driven development helps end-to-end tests and unit tests to work together.
The main part of the book is an extended exercise building a React front-end application from scratch using outside-in TDD. You'll learn:
- How and why to get your app tested on CI and automatically deploying before the first feature is written
- How to use the two-level TDD loop to stay laser-focused on building out one user-deliverable feature to completion
- How to write tests that provide maximum safety with minimum ongoing cost by testing the interface instead of the implementation
- How to get thorough coverage of edge cases while keeping your test suite fast