~/talk

Elizabeth Funk - An Introduction to React Testing Library

Talkat React Loop 2019 · on Friday, 2019-06-21· [testing, react]
links:none on file
slides:none on file

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

  1. 0:00Start
  2. 2:51What NOT to Expect
  3. 5:05Enzyme Pain Points
  4. 7:44render method
  5. 8:28Example Project
  6. 10:42Same Test with Enzyme
  7. 14:28Underlying Code
  8. 14:46fireEvent
  9. 17:22Accessibility
  10. 19:48Debugging
  11. 20:59React Testing Library
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.