Testing Vue 3 SPAs: Vitest + @vue/test-utils, RTL-style alternatives, Pinia testing via createTestingPinia, composable testing, msw for network mocks, Cypress component testing, Playwright e2e.
Use this skill to:
- Set up Vitest for Vue 3 with jsdom + @vue/test-utils.
- Pick mount vs shallowMount.
- Test components by props/emits/slots contract.
- Mock Pinia stores in tests.
- Test composables in isolation.
- Set up Playwright or Cypress for end-to-end.
Do NOT use this skill for:
- General Vue conventions (see vue-conventions).
- State patterns (see vue-state-management).
- Form-specific patterns (see vue-forms).