leeovery/agentic-skills/nuxt-testing

Claude Code and agent skill by leeovery/agentic-skills

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Testing strategy across unit, component, composable, API integration, and E2E layers. Use when adding tests, choosing the right tier for a piece of behaviour, setting up vitest or Playwright, or designing test seams for Nitro-side effects.

Install

npx vskill@latest install leeovery/agentic-skills/nuxt-testing

SKILL.md

Nuxt Testing

Pick the cheapest tier that gives a real signal. Real infrastructure or test seams over mocks. Test user-visible behaviour, not implementation details.

Core Concepts

  • [unit-and-component.md](references/unit-and-component.md) — vitest with @nuxt/test-utils, Testing Library, composable test helpers
  • [e2e-and-api.md](references/e2e-and-api.md) — Playwright for UI + API integration via the request fixture
  • [test-seams.md](references/test-seams.md) — /api/_dev/* endpoints and env-driven driver swaps for Nitro side effects

Tier Decision

BehaviourTier
Pure logic (models, enums, utils)Unit (vitest)
Composable in isolationUnit (vitest + withSetup)
Component DOM + user interactionComponent (Testing Library)
Server route, full request pipelineAPI integration (Playwright request)
Cross-step user journeys, real browserE2E (Playwright page)

Prefer API integration over UI E2E for server-side pipelines — faster, more deterministic, same Playwright runner.

Red Flags — STOP and Fix

  • `setTimeout()` in a test → use findBy*, waitFor(), or vi.waitFor()
  • Asserting `wrapper.vm.someInternalRef` → test what the user sees
  • Mocking a Nitro side effect by stubbing the module → add a driver-swap seam instead (see test-seams.md)
  • `mount(Component, { props: { modelValue, 'onUpdate:modelValue': … } })` → drive v-model from the user side: type in the field, assert the rendered value
  • Component test that fetches over the network → MSW handler
  • E2E test that hits Stripe/Turnstile/Resend live → provider test keys + memory driver
  • Snapshot of a whole component tree → asserts noise; pick the 2-3 things that matter
  • `fullyParallel: true` with a shared in-memory test seam → set workers: 1 and clear state in beforeEach
  • "Just one mock to get this green" → the seam is missing; fix the design, not the test

Quick Setup

ts
// vitest.config.ts
import { defineVitestConfig } from '@nuxt/test-utils/config'
export default defineVitestConfig({
test: { environment: 'happy-dom' }
})
ts
// playwright.config.ts — auto-spawn dev server, env-driven test mode
webServer: {
command: 'npm run dev -- --port 3100',
url: 'http://localhost:3100',
reuseExistingServer: !process.env.CI,
env: { NUXT_EMAIL_DRIVER: 'memory', /* provider test keys */ }
}

When NOT to Use This Skill

  • Pure backend-only repos (no Nuxt) — use vitest/Playwright docs directly
  • Visual regression — out of scope; use a dedicated tool (Percy, Chromatic)

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
14
Repository forks
4
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/leeovery/agentic-skills/nuxt-testing/badge)](https://verified-skill.com/skills/leeovery/agentic-skills/nuxt-testing)

Something wrong with this skill or its page? Tell us.