~/talk

We may not need component (unit) testing

Talkat Vue.js Nation 2024 · 2024-01-24..01-25· [testing, frontend-architecture]
slides:none on file

Argues that component unit tests aren’t always necessary and compares Vitest + Vue Test Utils (fast, easy mocking of composables, used to run three unit tests for the cart and three for the search) with Playwright component testing (runs in real browser, verifies styling and router sync but lacks easy mocking). Uses a pizza-store demo (cart, gallery, search) and finds: unit tests cover composable logic, Playwright catches visual/URL issues; avoid duplicating tests and pick Vitest for isolated logic, Playwright for visual or integration behavior.

AI-written summary · about

  1. 0:00Introduction
  2. 1:48Testing layers and component testing
  3. 5:25Small vs large components
  4. 7:13Unit vs integration for components
  5. 9:43Setting up the demo environment
  6. 11:09Card component with Vest
  7. 17:57Card component with Playwright
  8. 22:35Search component with Vest
  9. 28:40Search component with Playwright
  10. 31:58Summary
  11. 34:47Q&A
~/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.