~/talk

Playwright Component Tests: Are they the Testing-Library killer?

Talkat ReactNext 2024 · on Monday, 2024-06-24· [testing, react]
slides:none on file

Compares Playwright Component Tests and Testing Library by building a Pokedex app and measuring concrete outcomes: Playwright mounts components in a real browser via Vit bundles components, provides automatic screenshots and devtools, supports Testing Library–style queries and CSS selectors, but has no native function mocking and adds fragile cross-process “magic”. Performance example: a 7,000-node test runs about 1.6s vs 10s (Playwright vs Testing Library), visual snapshots and locator auto-retry work, but browser-driven bundling and serialization limits cause surprising gotchas.

AI-written summary · about

  1. 0:00Introduction
  2. 5:02Speaker intro
  3. 6:52Testing Library limits
  4. 7:54Playwright component tests
  5. 9:18Developer experience comparison
  6. 14:43Debugging failures
  7. 17:38Mocking differences
  8. 20:07Visual testing modes
  9. 23:02Performance and testing environments
  10. 26:12Component test magic
  11. 29:04Benchmark results
  12. 31:34Summary
~/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.