Establishing testing patterns with software design principles
summary
Lack of clarity around testing React apps causes fragile, low-value tests so the claim is to apply software design patterns to tests: favor mutation-layer tests that set an initial state, dispatch an increment action test, and assert store changes rather than heavy UI rendering. Practical tools mentioned include snapshot testing, Enzyme, create-react-app, and the eslint rule tester, plus shared utilities like mock initial data and generated test templates. One-off tests yield ~30–40% coverage easily while the final 5–10% costs disproportionate effort; shared utilities and lint rules survive major refactors.
AI-written summary · about
chapters (13)
- 0:00Start
- 5:05WHAT MAKES A GOOD TEST
- 12:29ISOLATION
- 13:38GENERAL PRINCIPLES
- 16:20TEST STRUCTURE
- 17:03PROS
- 20:07KEEP TESTS CLEAN
- 20:21TEST UTILITIES
- 23:12ESLINT RULE TESTER
- 24:18GENERATE TEST TEMPLATES
- 25:10LINT RULES AND DOCUMENTATION
- 27:16UNIT / INTEGRATION
- 28:05THIS HAPPENED BEFORE
related talks
29mTesting Is All About Principles
24mUsing React Testing Library to Write Stronger Tests
30mTesting Front-End Applications
53mTesting React Applications
45mWrite fewer tests! Model-based testing in React
01h 02mWriting better tests for your JavaScript app
18mTesting React in a Right Way
32mCrafting a Bulletproof testing pipeline for React Apps
