~/talk

TDCD: Test Driven Component Development

Talkat JSConf US 2019 · 2019-08-12..08-14· [react, testing]
slides:none on file

Advocates TDD for React by showing a concrete workflow: write failing unit tests, use react test renderer and enzyme shallow render to assert component outputs, then implement with hooks/useState until tests go green. A small todo app grows from five listed items to six after a tested add action; tests stay green while markup and styles swap to Material UI. The claim: behavior-first tests let a working app be built and verified before visual refactoring, and it actually runs.

AI-written summary · about

  1. 0:00Start
  2. 1:30Why Test-Driven Development
  3. 2:43Tdd Can and Should Be Fun
  4. 3:38Why Test React Components
  5. 3:56Jsx
  6. 5:07How To Test React Components
  7. 6:16React Test Renderer
  8. 11:17A Failing Test
  9. 13:15Syntax Error
  10. 15:10The Green Step
  11. 16:51Optimize the Code under Tests without Breaking the Test
  12. 25:09The Hooks Api
  13. 30:01Visual Refactoring
~/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.