~/talk

Testing React

Talkat NationJS Frontrunners React 2019 · on Friday, 2019-12-06· [react, testing]
slides:none on file

Argues that tests must assert concrete behavior: that a Switch actually toggles, that a Palette update changes a button color and survives a simulated reload, and that mocked intl or Redux providers don’t hide regressions. Rewrites examples (Switch, Palette), uses react-testing-library to render and fire DOM events, resorts to enzyme only for a genuine implementation-detail need, and wraps providers plus an enhanced rerender to verify persisted Redux state, showing refs as a last-resort for internals.

AI-written summary · about

  1. 0:00Start
  2. 1:04The Wrong Way To Write Tests
  3. 4:28Implementation
  4. 8:00React Hooks
  5. 8:50React Testing Library
  6. 10:20What Is React
  7. 11:46Firing Events
  8. 12:22Testing React Output Component
~/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.