
Test-Driven Development with React: Apply Test-Driven Development in Your Applications
Juntao Qiu
Résumé
Learn to use accelerated test-driven development (TDD) to build a React application from scratch. This book explains how your React components will be integrated, and how to refactor code to make it more concise and flexible.
With TDD you can develop a robust test suite to catch bugs, and develop modular, flexible code. Applying your understanding of how HTML, CSS, and JavaScript work in the browser you'll build a web application called Bookish using TDD and mainstream React stack technologies such as React, React-router, and Redux.
Using higher code quality you'll be able to write executable documentation using Cucumber. This is just one of many essentials in maintaining a practical TDD workflow in your daily workload. Test-Driven Development with React highlights best practices and design patterns that will enable you to write more maintainable and reusable React components.
What You'll Learn
- Manage your application's state using Redux
- Employ professional techniques for backend services
- Use Cypress as an end-to-end testing framework
- Utilize React-testing-library for unit and integration tests
Who This Book Is For
Ideal for web application developers who wants to learn how to write high quality code using Test-Driven Development.
- A Very Brief History of Test-Driven Development
-
- Test-Driven Development (TDD)
- Techniques that can help implement TDD
- Summary
- Further reading
- References
- Getting Started with Jest
-
- Set up the environment
- Jest at first glance
- Using matchers in Jest
- Mock & Stub
- Summary
- Test-Driven Development 101
-
- Writing tests
- Triangulation method
- How to implement tasking with TDD
- Summary
- Project Setup
-
- Application Requirements
- Create the project
- Summary
- Creating the Book List
- Acceptance tests for book list
- Talk to the book server
- Adding a loading indicator
- Acceptance tests
- Unit tests
- Testing data
- User Interface refinement
- Handling default value
- One last? change
- State management
- Implementing State Management
- Reducer
- Integration test for redux store
- Migration the application
- Summary
- Further readings
- References
- Business requirements
- End to end test
- Add more fields
- Review Editing
- Play with Cucumber
- Live Document with Cucumber
- Test Report
- Summary
Appendix: Design the State Shape of Your Application
- Error handling
- The data shape
Appendix: Background of Testing Strategies
-
- Different layers of tests
Caractéristiques techniques
PAPIER | |
Éditeur(s) | Apress |
Auteur(s) | Juntao Qiu |
Parution | 19/05/2021 |
Nb. de pages | 197 |
EAN13 | 9781484269718 |
Avantages Eyrolles.com
Consultez aussi
- Les meilleures ventes en Graphisme & Photo
- Les meilleures ventes en Informatique
- Les meilleures ventes en Construction
- Les meilleures ventes en Entreprise & Droit
- Les meilleures ventes en Sciences
- Les meilleures ventes en Littérature
- Les meilleures ventes en Arts & Loisirs
- Les meilleures ventes en Vie pratique
- Les meilleures ventes en Voyage et Tourisme
- Les meilleures ventes en BD et Jeunesse