antfu/skills

vue-testing-best-practices

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

All-time #1077 Trending #3091 Hot #3799 First seen Jan 31, 2026
8-week activity · all time api

Installation

$ npx skills add antfu/skills --skill vue-testing-best-practices

Summary

  • Comprehensive Vue.js testing guidance covering unit, component, and end-to-end testing strategies.
  • Addresses 11 common testing challenges including async handling, composable testing, Pinia store setup, Suspense components, and Teleport queries Recommends Vitest for unit and component testing infrastructure, with Playwright as the preferred E2E framework Covers black-box component testing patterns to prevent brittle tests during refactoring, async/await patterns to eliminate race conditions, and snapshot test anti-patterns Includes guidance on browser vs.
  • Node.js test runners for DOM event verification and computed style testing

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Security audits

Partner security reviews for this skill.

agent-trust-hub SAFE

Analyzed Mar 16, 2026

This skill is a collection of educational Markdown files providing best practices, patterns, and configuration guides for Vue.js testing. It contains no executable code or security risks.

snyk LOW

Analyzed Mar 16, 2026

No issues detected.

socket Score 0.9000 · 0 alerts

Analyzed Mar 18, 2026

  • license 1
  • maintenance 1
  • quality 0.9
  • supply chain 1
  • vulnerability 1

0 alerts

Also in this package

Other skills from antfu/skills · top by installs.

npx skills add antfu/skills

Browse all from antfu/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 5.9K
License LICENSE.md
Default branch main
Open issues 9
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0
LicenseMIT

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,129 B
  • docs SUMMARY.md 2,049 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 16,819 installs

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](reference/testing-vitest-recommended-for-vue.md)
  • Tests keep breaking when refactoring component internals → See [testing-component-blackbox-approach](reference/testing-component-blackbox-approach.md)
  • Tests fail intermittently with race conditions → See [testing-async-await-flushpromises](reference/testing-async-await-flushpromises.md)
  • Composables using lifecycle hooks or inject fail to test → See [testing-composables-helper-wrapper](reference/testing-composables-helper-wrapper.md)
  • Getting "injection Symbol(pinia) not found" errors in tests → See [testing-pinia-store-setup](reference/testing-pinia-store-setup.md)
  • Components with async setup won't render in tests → See [testing-suspense-async-components](reference/testing-suspense-async-components.md)
  • Snapshot tests keep passing despite broken functionality → See [testing-no-snapshot-only](reference/testing-no-snapshot-only.md)
  • Choosing end-to-end testing framework for Vue apps → See [testing-e2e-playwright-recommended](reference/testing-e2e-playwright-recommended.md)
  • Tests need to verify computed styles or real DOM events → See [testing-browser-vs-node-runners](reference/testing-browser-vs-node-runners.md)
  • Testing components created with defineAsyncComponent fails → See [async-component-testing](reference/async-component-testing.md)
  • Teleported modal content can't be found in wrapper queries → See [teleport-testing-complexity](reference/teleport-testing-complexity.md)

Reference