vue-testing

Codify Vue 3 testing practices for unit, integration, and end-to-end workflows.

9|1|Updated Jun 16, 2026
One-click install
npx skills add https://github.com/AratKruglik/antigravity-sdlc --skill vue-testing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vue-testing
Source: https://github.com/AratKruglik/antigravity-sdlc/tree/main/plugins/vue-plugin/skills/vue-testing
Command: npx skills add https://github.com/AratKruglik/antigravity-sdlc --skill vue-testing

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Vue 3 component testing is complex and boilerplate heavy; this skill provides guidance and patterns for Vitest, Vue Test Utils, Pinia testing, and end-to-end integrations to ensure robust Vue apps.

Core Features & Use Cases

  • Set up Vitest with jsdom and @vue/test-utils for Vue 3 projects.
  • Choose between mount and shallowMount and test components by props, emits, and slots.
  • Mock Pinia stores and test composables in isolation.
  • Integrate MSW for network mocks and Cypress/Playwright for end-to-end testing.

Quick Start

Configure Vitest in a Vue 3 project with jsdom and @vue/test-utils, then write a basic component test to verify rendering and props.

Frequently Asked Questions about vue-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Vitest with Vue Test Utils for Vue 3 component testing?

To set up Vue 3 testing, configure Vitest with jsdom and integrate @vue/test-utils. This environment lets you mount components and verify rendering, props, emits, and slots effectively.

What is the best way to mock Pinia stores when testing Vue composables?

Mocking Pinia stores allows you to test Vue composables in isolation. By mocking the store state and actions, you validate composable logic independently without triggering actual state mutations or network requests.

How do I use MSW for network mocking in Vue integration tests?

Using MSW for network mocking in Vue integration tests intercepts outgoing API requests at the network level. Integrating MSW with Vitest ensures your component tests handle asynchronous data fetching deterministically without real backend dependencies.

When should I use mount vs shallowMount in Vue Test Utils?

Use mount for full component rendering to verify child component integration, and shallowMount to isolate the parent component by stubbing children. This choice determines whether your tests validate deep rendering trees or focus on individual component behavior.

Can I use Cypress and Playwright for Vue 3 end-to-end testing workflows?

Yes, you can integrate Cypress and Playwright for Vue 3 end-to-end testing. These tools validate full application workflows across browser environments, complementing your unit and integration tests managed by Vitest and MSW.

How do I prevent flaky tests in Vue testing workflows?

To prevent flaky tests in Vue testing, apply recommended test structures and guardrails that isolate component state and mock network requests using MSW. This ensures deterministic test execution across unit, integration, and end-to-end workflows.