Agent skill

vue-testing-best-practices

Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing.

Stars 4,427
Forks 225

Install this agent skill to your Project

npx add-skill https://github.com/antfu/skills/tree/main/skills/vue-testing-best-practices

SKILL.md

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

Expand your agent's capabilities with these related and highly-rated skills.

antfu/skills

pnpm

Node.js package manager with strict dependency resolution. Use when running pnpm specific commands, configuring workspaces, or managing dependencies with catalogs, patches, or overrides.

4,427 225
Explore
antfu/skills

vue

Vue 3 Composition API, script setup macros, reactivity system, and built-in components. Use when writing Vue SFCs, defineProps/defineEmits/defineModel, watchers, or using Transition/Teleport/Suspense/KeepAlive.

4,427 225
Explore
antfu/skills

vite

Vite build tool configuration, plugin API, SSR, and Vite 8 Rolldown migration. Use when working with Vite projects, vite.config.ts, Vite plugins, or building libraries/SSR apps with Vite.

4,427 225
Explore
antfu/skills

slidev

Create and present web-based slidedecks for developers using Slidev with Markdown, Vue components, code highlighting, animations, and interactive features. Use when building technical presentations, conference talks, code walkthroughs, teaching materials, or developer decks.

4,427 225
Explore
antfu/skills

vitest

Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.

4,427 225
Explore
antfu/skills

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, Volar, vue-tsc. Load for any Vue, .vue files, Vue Router, Pinia, or Vite with Vue work. ALWAYS use Composition API unless the project explicitly requires Options API.

4,427 225
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results