About vue-testing-best-practices
A testing best-practices skill for Vue.js projects, covering test setup, components, async behavior, and end-to-end testing guidance.
Key features
- 01Vue 3 test infrastructure guidance
- 02Black-box component testing
- 03Async and composable testing
- 04End-to-end and browser test choices
Use cases
- 01Setting up tests for a Vue 3 project
- 02Diagnosing race conditions in async tests
- 03Choosing an end-to-end testing approach for a Vue app
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ onmax/ nuxt-skills --skill vue-testing-best-practicesAfter installing, type/vue-testing-best-practicesin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
reference/async-component-testing.mdteleport-testing-complexity.mdtesting-async-await-flushpromises.mdtesting-browser-vs-node-runners.mdtesting-component-blackbox-approach.mdtesting-composables-helper-wrapper.mdtesting-e2e-playwright-recommended.mdtesting-no-snapshot-only.mdtesting-pinia-store-setup.mdtesting-suspense-async-components.mdtesting-vitest-recommended-for-vue.mdDetails
From the project READMEVue.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
Comments
Markdown supported