• Complain

Daniel Irvine - Mastering React Test-Driven Development: Build simple and maintainable web apps with React, Redux, and GraphQL, 2nd Edition

Here you can read online Daniel Irvine - Mastering React Test-Driven Development: Build simple and maintainable web apps with React, Redux, and GraphQL, 2nd Edition full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2022, publisher: Packt Publishing, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Daniel Irvine Mastering React Test-Driven Development: Build simple and maintainable web apps with React, Redux, and GraphQL, 2nd Edition
  • Book:
    Mastering React Test-Driven Development: Build simple and maintainable web apps with React, Redux, and GraphQL, 2nd Edition
  • Author:
  • Publisher:
    Packt Publishing
  • Genre:
  • Year:
    2022
  • Rating:
    3 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 60
    • 1
    • 2
    • 3
    • 4
    • 5

Mastering React Test-Driven Development: Build simple and maintainable web apps with React, Redux, and GraphQL, 2nd Edition: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Mastering React Test-Driven Development: Build simple and maintainable web apps with React, Redux, and GraphQL, 2nd Edition" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Learn test-driven and behavior-driven development techniques that will give you greater confidence when building React applications

Key Features
  • Explore the TDD process, how it works, and why it will help you write maintainable React apps
  • Develop a component testing framework from scratch, which will help you understand the mechanics of good unit testing
  • Reduce complexity by using unit tests and end-to-end acceptance tests to drive the design of your apps
Book Description

Test-driven development (TDD) is a programming workflow that helps you build your apps by specifying behavior as automated tests. The TDD workflow future-proofs apps so that they can be modified without fear of breaking existing functionality. Another benefit of TDD is that it helps software development teams communicate their intentions more clearly, by way of test specifications.

This book teaches you how to apply TDD when building React apps. Youll create a sample app using the same React libraries and tools that professional React developers use, such as Jest, React Router, Redux, Relay (GraphQL), Cucumber, and Puppeteer. The TDD workflow is supported by various testing techniques and patterns, which are useful even if youre not following the TDD process. This book covers these techniques by walking you through the creation of a component test framework. Youll learn automated testing theory which will help you work with any of the test libraries that are in standard usage today, such as React Testing Library. This second edition has been revised with a stronger focus on concise code examples and has been fully updated for React 18.

By the end of this TDD book, youll be able to use React, Redux, and GraphQL to develop robust web apps.

What you will learn
  • Build test-driven applications using React 18 and Jest
  • Understand techniques and patterns for writing great automated tests
  • Use test doubles and mocks effectively
  • Test-drive browser APIs, including the Fetch API and the WebSocket API
  • Integrate with libraries such as React Router, Redux, and Relay (GraphQL)
  • Use Cucumber.js and Puppeteer to build Behaviour- Driven Development (BDD) style tests for your applications
  • Build and test async Redux code using redux-saga and expect-redux
Who this book is for

This book is for frontend developers who are looking to improve their testing practices and increase the quality and maintainability of their applications. To make the most of this book, youll need knowledge of the JavaScript programming language.

Table of Contents
  1. First Steps with Test-Driven Development
  2. Rendering Lists and Detail Views
  3. Refactoring the Test Suite
  4. Test-Driving Data Input
  5. Adding Complex Form Interactions
  6. Exploring Test Doubles
  7. Testing useEffect and Mocking Components
  8. Building an Application Component
  9. Form Validation
  10. Filtering and Searching Data
  11. Test-Driving React Router
  12. Test-Driving Redux
  13. Test-Driving GraphQL
  14. Building a Logo Interpreter
  15. Adding Animation
  16. Working with WebSockets
  17. Writing Your First Cucumber Test
  18. Adding Features Guided by Cucumber Tests
  19. Understanding TDD in the Wider Testing Landscape

Daniel Irvine: author's other books


Who wrote Mastering React Test-Driven Development: Build simple and maintainable web apps with React, Redux, and GraphQL, 2nd Edition? Find out the surname, the name of the author of the book and a list of all author's works by series.

Mastering React Test-Driven Development: Build simple and maintainable web apps with React, Redux, and GraphQL, 2nd Edition — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Mastering React Test-Driven Development: Build simple and maintainable web apps with React, Redux, and GraphQL, 2nd Edition" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Mastering React Test-Driven Development Second Edition Build simple and - photo 1
Mastering React Test-Driven Development
Second Edition

Build simple and maintainable web apps with React, Redux, and GraphQL

Daniel Irvine

BIRMINGHAMMUMBAI Mastering React Test-Driven D evelopment Seco nd Edition - photo 2

BIRMINGHAMMUMBAI

Mastering React Test-Driven D evelopment
Seco nd Edition

Copyright 2022 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Group Product Manager: Pavan Ramchandani

Publishing Product Manager: Bhavya Rao

Senior Editor: Aamir Ahmed

Senior Content Development Editor: Feza Shaikh

Technical Editor: Saurabh Kadave

Copy Editor: Safis Editing

Project Coordinator: Manthan Patel

Proofreader: Safis Editing

Indexer: Manju Arasan

Production Designer: Aparna Bhagat

Marketing Coordinator: Anamika Singh and Marylou De Mello

First published: May 2019

Second edition: September 2022

Production reference: 2130922

Published by Packt Publishing Ltd.

Livery Place

35 Livery Street

Birmingham

B3 2PB, UK.

ISBN 978-1-80324-712-0

www.packt.com

To Nige, my first mentor, who taught me the importance of slowing down.

Daniel Irvine

Foreword

For as long as test-driven development(TDD) has existed, there has been debate over whether TDD is feasible for user interface workeven among its staunchest proponents. When people built tools to prove that its possible, the debate shifted to whether TDD is as valuable for UIs, considering that programmers can get rapid feedback by seeing and interacting with an interface. Even when TDDs value is evidenced by smaller, more consistent, single-responsibility units of UI code, some would question whether the same could have been accomplished with less effort by simply following established design patterns.

Is TDD worth your time? Will it result in fewer bugs in your code? Will it improve the design of your system? Will it make future maintenance easier? Maybe.

In the fifteen-or-so years that Ive been learning, practicing, and teaching test-driven development I have oscillated back-and-forth. Sometimes I relentlessly pursue 100% code coverage, and other times Ill build worrisomely large applications with no automated tests at all. What Ive foundand what might surprise some readersis that my code basically turns out the same whether I practice TDD or not: a similar frequency of bugs, the same idiosyncratic design, and no more or less a burden to maintain.

(At this point, youd be right to start wondering what this ambivalent foreword is doing in a book designed to teach you TDD.)

The reason that TDD itself doesnt impact my code very much is because my years of practice have utterly and irrevocably changed me.

I write small single-purpose units, because Ive felt the sheer exhaustion of writing tests of sprawling unfocused objects.

I avoid mixing levels of abstraction, because Ive been hopelessly lost in mazes of mock objects that combine testing logic with specifying interactions.

I segregate code coupled to frameworks from feature logic, because Ive contorted too many tests to fit dependencies that werent meant to be tested.

Rigorously practicing TDD transformed my career. Not because its the One True Way to program, but because it forces you to ceaselessly ask how would we test that? TDD is incredibly challenging at first, but patterns gradually emerge that result in easy-to-test code. And code thats easy to test, is easy to write. And use. And maintain.

Wherever you are in your journey, I hope this book brings you closer to a similar destination.

Justin Searls VP of Engineering at Test Double

testdouble.com

Contributors
About the author

Daniel Irvine is a software consultant based in London. He 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. He co-founded the Queer Code London meetup and is an active member of the European software craft community.

I would like to thank the technical reviewer of this edition of the book, Emmanuel Demey, for spotting the weakest points of the text and helping me improve them. I continue to be grateful for my friend and technical reviewer from the first edition, Raimo Radczewski, who is also the author of the expect-redux package that is used in this book.

The team at Packt has been supportive and professional throughout, giving me exactly what I needed to finish the book. For this second edition, I am thankful for the detailed and thoughtful editing that Feza Shaikh has undertaken, helping to deliver the book ahead of schedule. My technical editor, Saurabh Kadave, spotted plenty of mistakes that would have otherwise gone unnoticed. Aamir Ahmed, Bhavya Rao, and Manthan Patel were also instrumental in the production of the second edition.

From the first edition, I am thankful for the hard work of Keagan Carneiro, Sachin Sunilkumar from Packt, and also my friends and colleagues Charlotte Payne, Dan Pelensky, Isidro Lopez, Makis Otman, Sam Szreter, Zach Shaw, Brendan Murphy, and Lucy Monie Hall.

Finally, thank you to all the readers of the first edition who took the time to send me comments and feedback, all of which were invaluable. This second edition is better because of your help.

About the reviewer

Emmanuel Demey works with the JavaScript ecosystem every day, and he spends his time sharing his knowledge with anybody. His first goal at work is to help the people that he works with. He speaks at French conferences (Devfest Nantes, Devfest Toulouse, Sunny Tech, Devoxx France, and others) about anything related to the web platform: JavaScript frameworks (Angular, React.js, Vue.js), accessibility, Nest.js, and so on. He has been a trainer for 10 years at Worldline and Zenika (two French consulting companies). He is also a co-leader of the Google Developer of Lille group and a co-organizer of the Devfest Lille conference.

Table of Contents
Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Mastering React Test-Driven Development: Build simple and maintainable web apps with React, Redux, and GraphQL, 2nd Edition»

Look at similar books to Mastering React Test-Driven Development: Build simple and maintainable web apps with React, Redux, and GraphQL, 2nd Edition. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Mastering React Test-Driven Development: Build simple and maintainable web apps with React, Redux, and GraphQL, 2nd Edition»

Discussion, reviews of the book Mastering React Test-Driven Development: Build simple and maintainable web apps with React, Redux, and GraphQL, 2nd Edition and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.