All skills
vuejs-ai avatar

/vue-testing-best-practices

@bc922e4 official
by Vue AIvuejs-ai/skills2.9k stars
167

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

Use this Skill: https://skilld.dev/gh/vuejs-ai/skills/vue-testing-best-practices

This session only. Nothing lands on disk.

SKILL.md

β‰ˆ40 tokens always: the name and description. β‰ˆ471 when used: this file. β‰ˆ15k more on demand in 11 files.

Vue.js testing best practices, patterns, and common gotchas.

Testing

Reference

Source: SKILL.md on GitHub

No alerts16d5 checks Β· Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides standard documentation, configuration guidelines, and best practices for testing Vue 3 applications with Vitest, Vue Test Utils, and Playwright. No security vulnerabilities or malicious patterns were detected.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW Β· No issues

  • Runlayer7mo

    1/12 files flagged

  • ZeroLeaks5mo

    Score: 93/100 Β· 2 sections analyzed

Signed by skilld at bc922e4. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 8 months ago
version
1.0.0
author
github.com/vuejs-ai
  • Vue
  • Testing
  • vitest
  • vue-test-utils
  • playwright
  • e2e
  • composables
  • pinia
  • mocking

README badge

README badge for vuejs-ai/skills/vue-testing-best-practices

Instructs Claude on Vue 3 testing patterns using Vitest, Vue Test Utils, and Playwright, covering component testing, composables, Pinia store setup, async components, and common pitfalls like race conditions and snapshot test false positives. Use this to avoid brittle tests and correctly test lifecycle hooks, injections, and end-to-end flows in Vue projects.

Generated from the current SKILL.md.

Does this skill cover both unit and end-to-end testing?
Yes. It covers unit testing with Vitest and Vue Test Utils for components and composables, plus Playwright for E2E testing.
What testing runner does this skill recommend?
Vitest is the recommended unit testing framework for Vue 3 projects.
Does this cover testing Pinia stores?
Yes. The skill includes guidance on setting up Pinia store injection in tests to avoid 'Symbol(pinia) not found' errors.
Can I use this skill to test async components and Suspense?
Yes. The skill covers testing async setup, defineAsyncComponent, and Suspense boundaries.
Does this address flaky tests and race conditions?
Yes. The skill includes patterns for handling async/await and promise flushing to prevent intermittent test failures.

Generated from the current SKILL.md. These answers refresh after source changes.