~/talk

Demystifying Nuxt Test Utils

Talkat Vue Fes Japan 2025 · on Saturday, 2025-10-25· [vue, testing]
name:wattanx
links:none on file
slides:none on file

Explains how @nuxt/test-utils boots a real Nuxt environment in Vitest so compiler macros like definePageMeta, auto-imports and Nuxt modules run in tests, and plugins and middleware execute the same lifecycle as the app. Shows using mountSuspended, renderSuspended and mockNuxtImport to mount pages with middleware, register Nitro endpoints via registerEndpoint, run SSR tests that return prerendered HTML, and run Playwright-backed browser tests with hydration checks.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 1:12Nuxt test experience survey
  3. 3:00Challenges in testing Nuxt apps
  4. 7:40Introducing Nuxt Test Utils
  5. 10:11How Nuxt modules run in tests
  6. 13:04Why plugins work in tests
  7. 15:34Basic usage of Nuxt Test Utils
  8. 19:10Mocking Nuxt imports and components
  9. 20:36Server-side rendering testing
  10. 22:48Browser testing with Playwright
  11. 24:38Environment separation tips
  12. 26:43Test-specific configurations
  13. 27:06Avoiding implementation-dependent tests
  14. 28:39Summary and closing
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.