Название: Outside-In React Development: A TDD Primer Автор: Josh Justice Издательство: Leanpub Год: 2022-10-13 Страниц: 245 Язык: английский Формат: pdf (true), epub Размер: 27.3 MB
Learn how to build React apps using outside-in test-driven development, including end-to-end tests with Cypress and unit tests with Jest and React Testing Library. Includes an extended exercise building two application features. See how outside-in TDD leads to a thorough test suite, better regression safety, and a faster development speed.
How should we decide what kinds of tests to write for our React applications, and how many of each kind? How can we write a test suite that gives us confidence rather than just giving us busywork? Instead of tests slowing down our development, could they actually help us go faster?
Outside-In React Development tackles these questions by applying the practice of outside-in test-driven development (TDD) to React applications. It explains the problems that agile software development solves, the key role that test-driven development plays, and the way outside-in test-driven development helps end-to-end tests and unit tests to work together. The main part of the book is an extended exercise building a React front-end application from scratch using outside-in TDD.
The World Wide Web started out as a platform for displaying only static documents, but now it hosts fully-featured interactive applications. The javascript language and browser APIs allow building user interfaces that are as rich as conventional desktop and mobile applications in many respects. Front-end javascript frameworks like React abstract away many of the low-level details of managing rich user interfaces, allowing developers to focus on delivering business functionality.
Back when javascript was only used to provide a little enhancement on top of server-rendered web pages, testing javascript code was both difficult and, in many cases, unnecessary. But with many web applications now implementing their entire user interface in javascript, testing that javascript code has become essential. Responding to this need, in the past few years the open-source community has heavily invested in javascript testing tools—test runners, framework-specific testing libraries, and browser automation tools.
But good testing tools aren’t the only thing needed for developers to achieve a positive testing experience. Many developers loathe writing tests, and javascript developers are no exception. Maybe the tests take much longer to write than the corresponding production code. Maybe one change to production code breaks many tests, necessitating lots of effort to fix them. Maybe the tests fail sporadically for no obvious reason. Maybe the tests don’t actually seem to be confirming anything that matters. Whatever the reason, many javascript developers feel like testing isn’t delivering on its promise to make their apps better.
You'll learn:
How and why to get your app tested on CI and automatically deploying before the first feature is written How to use the two-level TDD loop to stay laser-focused on building out one user-deliverable feature to completion How to write tests that provide maximum safety with minimum ongoing cost by testing the interface instead of the implementation How to get thorough coverage of edge cases while keeping your test suite fast
Скачать Outside-In React Development : A TDD Primer
Mastering React Native: A Beginner's Guide Название: Mastering React Native: A Beginner's Guide Автор: Sufyan bin Uzayr Издательство: CRC Press Год: 2023 Страниц: 355 Язык: английский Формат:...
Build Blog with React (SSR) and Wagtail Название: Build Blog with React (SSR) and Wagtail Автор: Michael Yin Издательство: Leanpub Год: 2021-05-05 Страниц: 167 Язык: английский Формат: pdf...
Build SPA with React and Wagtail Название: Build SPA with React and Wagtail Автор: Michael Yin Издательство: Leanpub Год: 2021-01-14 Страниц: 170 Язык: английский Формат: pdf (true)...
Acceptance Test Driven Development with React Название: Acceptance Test Driven Development with React Автор: Juntao Qiu Издательство: Amazon Digital Services LLC ASIN: B07GDPW69R Год: 2018...