~/talk

Anatomy of a Test Runner: What Vitest Keeps Getting Right

Talkat Frontend Nation 2024 · 2024-06-04..06-07· [testing, developer-experience]
slides:none on file

Vitest claims to be fast and production-like by reuses your bundler config so tests run the same ESM build as production and avoid reimplementing transformers or module-name-mapper hacks. It provides a browser mode with Vite HMR for instant watch feedback, ships with happy-dom for node DOM tests, and baked-in assertion retries (~1–5s) to handle async UI updates. It supports single-file components, module mocking, and swapping environments between Node and real browser runs, reducing flaky CI and maintenance.

AI-written summary · about

  1. 0:00Vitest testing
  2. 1:05What is Vitest
  3. 2:54Vitest for Vite
  4. 4:01Test runner core
  5. 6:33Module resolution
  6. 8:03Test runner features
  7. 11:18Runnables and plans
  8. 12:42Assertion libraries
  9. 14:48Browser retries
  10. 15:32Execution contexts
  11. 16:14Mocking and stubbing
  12. 17:18Spec retries
  13. 18:00Why Vitest stands out
  14. 20:30Future-proof testing
  15. 23:22Closing remarks
  16. 23:44Q&A: Unit vs E2E tests
  17. 24:48Q&A: Vitest HMR
  18. 25:54Q&A: Browser mode
  19. 26:38Q&A: Performance
~/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.