Nuxt testing with @nuxt/test-utils — unit tests with Nuxt runtime environment, component testing with mountSuspended, mocking auto-imports, and e2e testing with Playwright. Use when writing tests for Nuxt apps, components, composables, or pages.
Testing Nuxt applications using @nuxt/test-utils with Vitest. Covers unit testing in a Nuxt runtime environment, component testing with mountSuspended, mocking Nuxt auto-imports and components, and end-to-end testing with Playwright.
Based on Nuxt 4.x / @nuxt/test-utils documentation, generated at 2026-04-10.
Setup
Topic
Description
Reference
Installation & Config
Dependencies, vitest.config.ts with projects, test directory structure