Table of Contents
Preface
Part 1 – Exploring the TDD Workflow
1
First Steps with Test-Driven Development
Technical requirements
Creating a new React project from scratch
Installing npm
Creating a new Jest project
Bringing in React and Babel
Displaying data with your first test
Writing a failing test
Make it pass
Making use of the act test helper
Triangulating to remove hardcoding
Backtracking on ourselves
Refactoring your work
Sharing setup code between tests
Extracting methods
Writing great tests
Red, green, refactor
Streamlining your testing process
Summary
Further reading
2
Rendering Lists and Detail Views
Technical requirements
Sketching a mock-up
Creating the new component
Specifying list item content
Selecting data to view
Initial selection ...
Get Mastering React Test-Driven Development - Second Edition 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.