Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
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 (21) Chapters Close

Preface 1. Section 1: First Principles of TDD
2. First Steps with Test-Driven Development FREE CHAPTER 3. Test-driving Data Input with React 4. Exploring Test Doubles 5. Creating a User Interface 6. Section 2: Building a Single-Page Application
7. Humanizing Forms 8. Filtering and Searching Data 9. Test-driving React Router 10. Test-driving Redux 11. Test-driving GraphQL 12. Section 3: Interactivity
13. Building a Logo Interpreter 14. Adding Animation 15. Working with WebSockets 16. Section 4: Acceptance Testing with BDD
17. Writing Your First Acceptance Test 18. Adding Features Guided by Acceptance Tests 19. Understanding TDD in the Wider Testing Landscape 20. Other Books You May Enjoy

Exercises

The Git tag for this section is chapter-1-exercises.
  • Rename Appointment.js and Appointment.test.js to AppointmentsDayView.js and AppointmentsDayView.test.js. While it's fine to include multiple components in one file if they form a hierarchy, you should always name the file after the root component for that hierarchy.
  • Complete the Appointment component by displaying the following fields on the page. You should use a table HTML element to give the data some visual structure. This shouldn't affect how you write your tests:
    • Customer last name, using the lastName field
    • Customer telephone number, using the phoneNumber field
    • Stylist name, using the stylist field
    • Salon service, using the service field
    • Appointment notes, using the notes field
  • Add a heading to Appointment to make it clear which appointment time is being viewed.
  • There is some repeated sample data...
You have been reading a chapter from
Mastering React Test-Driven Development
Published in: May 2019
Publisher: Packt
ISBN-13: 9781789133417
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 €18.99/month. Cancel anytime