Mastering React Test-Driven Development

4.7 (3 reviews total)
By Daniel Irvine
    Advance your knowledge in tech with a Packt subscription

  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Section 1: First Principles of TDD

About this book

Many programmers are aware of TDD but struggle to apply it beyond basic examples. This book teaches how to build complex, real-world applications using Test-Driven Development (TDD). It takes a first principles approach to the TDD process using plain Jest and includes test-driving the integration of libraries including React Router, Redux, and Relay (GraphQL).

Readers will practice systematic refactoring while building out their own test framework, gaining a deep understanding of TDD tools and techniques. They will learn how to test-drive features such as client- and server-side form validation, data filtering and searching, navigation and user workflow, undo/redo, animation, LocalStorage access, WebSocket communication, and querying GraphQL endpoints.

The book covers refactoring codebases to use the React Router and Redux libraries. via TDD. Redux is explored in depth, with reducers, middleware, sagas, and connected React components. The book also covers acceptance testing using Cucumber and Puppeteer.

The book is fully up to date with React 16.9 and has in-depth coverage of hooks and the ‘act’ test helper.

Publication date:
May 2019
Publisher
Packt
Pages
496
ISBN
9781789133417

 

Section 1: First Principles of TDD

This section is an exploration of the principles of test-driven development. You'll test drive the rendering of data and the loading of data from our server, and in the process, you'll build your own test helpers that help to simplify and accelerate your testing. By the end of the section, you'll have a working application.

This section includes the following chapters:

About the Author

  • Daniel Irvine

    Daniel Irvine is a software consultant based in London. He is a member of the European software craft community and works with a variety of languages including C#, Clojure, JavaScript, and Ruby. Hes a mentor and coach for junior developers and runs TDD and XP workshops and courses. When hes not working, he spends time cooking and practicing yoga.

    Browse publications by this author

Latest Reviews

(3 reviews total)
The contents is very thorough, well written and timely.
There really is not a lot of material on learning TDD for react that I can find. This book starts out fast and deep and isn’t super beginner friendly but it does cover every test you could ever hope to write so if you take your time and combine this book with a lot of practice you will find inside these pages everything you could ever hope to know on the subject 4.5 stars. Would have been 5 if it was a little more beginner friendly
Très bon livre, précis et concis.

Recommended For You

Book Title
Unlock this book and the full library for only $5/m
Access now