vue-testing-best-practices
Comprehensive Vue.js testing guidance covering unit, component, and end-to-end testing strategies.
Works with
What it does
Addresses 11 common testing challenges including async handling, composable testing, Pinia store setup, Suspense components, and Teleport queries
Recommends Vitest for unit and component testing infrastructure, with Playwright as the preferred E2E framework
Covers black-box component testing patterns to reduce brittleness during refactoring, async/await synchronization, and snapshot tes
Installation Guide
How to use vue-testing-best-practices on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- โบCursor installed and configured on your machine
- โบNode.js 16+ with npm โ verify with
node --version - โบActive project directory where you want to add
vue-testing-best-practices
Run the install command
Execute the skills CLI command in your project's root directory to begin installation:
Fetches vue-testing-best-practices from hyf0/vue-skills and configures it for Cursor.
Select Cursor when prompted
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate vue-testing-best-practices. Access via /vue-testing-best-practices in your agent's command palette.
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Documentation
Vue.js testing best practices, patterns, and common gotchas.
Testing
- Setting up test infrastructure for Vue 3 projects โ See testing-vitest-recommended-for-vue
- Tests keep breaking when refactoring component internals โ See testing-component-blackbox-approach
- Tests fail intermittently with race conditions โ See testing-async-await-flushpromises
- Composables using lifecycle hooks or inject fail to test โ See testing-composables-helper-wrapper
- Getting "injection Symbol(pinia) not found" errors in tests โ See testing-pinia-store-setup
- Components with async setup won't render in tests โ See testing-suspense-async-components
- Snapshot tests keep passing despite broken functionality โ See testing-no-snapshot-only
- Choosing end-to-end testing framework for Vue apps โ See testing-e2e-playwright-recommended
- Tests need to verify computed styles or real DOM events โ See testing-browser-vs-node-runners
- Testing components created with defineAsyncComponent fails โ See async-component-testing
- Teleported modal content can't be found in wrapper queries โ See teleport-testing-complexity
Reference
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort