Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Mastering React Test-Driven Development

You're reading from   Mastering React Test-Driven Development Build rock-solid, well-tested web apps with React, Redux and GraphQL

Arrow left icon
Product type Paperback
Published in May 2019
Publisher Packt
ISBN-13 9781789133417
Length 496 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Daniel Irvine Daniel Irvine
Author Profile Icon Daniel Irvine
Daniel Irvine
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface
Who this book is for
What this book covers
To get the most out of this book
Get in touch
1. First Steps with Test-Driven Development FREE CHAPTER 2. Test-driving Data Input with React 3. Exploring Test Doubles 4. Creating a User Interface 5. Humanizing Forms 6. Filtering and Searching Data 7. Test-driving React Router 8. Test-driving Redux 9. Test-driving GraphQL 10. Building a Logo Interpreter 11. Adding Animation 12. Working with WebSockets 13. Writing Your First Acceptance Test 14. Adding Features Guided by Acceptance Tests 15. Understanding TDD in the Wider Testing Landscape

Adding Animation

Animation lends itself to test-driven development just as much as any other feature. However, it also lends itself to manual testing, since it helps to observe if our code is doing the right thing according to our eyes. This is particularly true because animation is not something that most programmers do every day. When something is new, it's often better to do lots of manual tests to verify behavior in addition to your tests.

In fact, while preparing for this chapter I did a lot of manual testing. The walk-through that you're about to be presented with was not a start-to-finish affair for me. I had to play with a number of different approaches, taking many wrong turns. There were many times that I opened my browser to the forward 100 or right 90 type to verify what was actually happening.

Once my code was working, I then had to refactor...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime
Banner background image