Vue Testing Best Practices
Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.
- Type
- Skill
- Author
- vuejs-ai
- Category
- Testing
- GitHub stars
- 3.2K
- Installs
- 13.8K
- Last updated
- October 23, 2026
Install
npx skills add https://github.com/vuejs-ai/skills --skill vue-testing-best-practicesUse cases
- Set up Vitest and Vue Test Utils for a component test suite.
- Mock dependencies in a component test to isolate behavior.
- Write Playwright end-to-end tests for a Vue app's key flows.
Frequently Asked Questions
Which test tools does this skill cover?
Vitest and Vue Test Utils for component tests, plus Playwright for E2E testing.
Does it cover mocking?
Yes, mocking is part of the testing patterns it documents.
Is it only for unit tests?
No, it also covers component testing and Playwright end-to-end testing.
About this skill
Covers Vue.js testing with Vitest, Vue Test Utils, component testing, mocking, and common testing patterns, plus Playwright for end-to-end coverage. It works as reference material for setting up or improving a Vue test suite. Applicable to both unit-level component tests and browser-driven E2E flows.
Summary written with AI assistance from the project's public description.
Categories
More from vuejs-ai
Vue Best Practices
MUST be used for Vue.js tasks. Strongly recommends Composition API with `<script setup>` and TypeScript as the standard approach. Covers Vue 3, SSR...
by vuejs-ai
Vue Debug Guides
Vue 3 debugging and error handling for runtime errors, warnings, async failures, and SSR/hydration issues. Use when diagnosing or fixing Vue issues.
by vuejs-ai
Vue Pinia Best Practices
Pinia stores, state management patterns, store setup, and reactivity with stores.
by vuejs-ai
Vue Router Best Practices
Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.
by vuejs-ai
Similar Skills
Find Skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", o...
by vercel-labs
Grill Me
A relentless interview to sharpen a plan or design.
by mattpocock
Ai Video Generation
Generate AI videos with Google Veo, Seedance 2.0, HappyHorse, Wan, Grok and 40+ models via inference.sh CLI. Models: Veo 3.1, Veo 3, Seedance 2.0,...
by inference-sh
Ai Image Generation
Generate AI images with GPT-Image-2, FLUX, Gemini, Grok, Seedream, Reve and 50+ models via inference.sh CLI. Models: GPT-Image-2, FLUX Dev LoRA, FL...
by inference-sh