Elizabeth Funk - An Introduction to React Testing Library
summary
Compares React Testing Library to Enzyme and shows concrete wins: a small Create React App “hang person” is tested with getByText and fireEvent to type "bird", click start, and assert four underscores render (UI-level check), while Enzyme forces test-only attributes, instance.state inspection or mounting that returns three matching nodes. Demonstrates prettyDOM output that reflects real HTML (no styled-components noise) and argues RTL improves maintainability and accessibility.
AI-written summary · about
chapters (11)
- 0:00Start
- 2:51What NOT to Expect
- 5:05Enzyme Pain Points
- 7:44render method
- 8:28Example Project
- 10:42Same Test with Enzyme
- 14:28Underlying Code
- 14:46fireEvent
- 17:22Accessibility
- 19:48Debugging
- 20:59React Testing Library
related talks
18mTesting React in a Right Way
24mUsing React Testing Library to Write Stronger Tests
41mUI and Unit Testing with Airbnb's Enzyme
16mCrushing React bugs with Jest and Enzyme
06mJest & Enzyme-testing your React application
26mMigrating from Enzyme to React Testing Library
53mTesting React Applications
10mTesting React Applications
