V
vue-testing-best-practices
by @antfuv
4.5(156)
掌握Vue.js测试的最佳实践,涵盖Vitest、Vue Test Utils和组件测试,确保Vue应用的高质量和稳定性。
安装方式
npx skills add antfu/skills --skill vue-testing-best-practicescompare_arrows
Before / After 效果对比
1 组使用前
缺乏统一的Vue.js测试最佳实践时,开发者可能采用不一致的测试框架或方法,导致测试覆盖率不足、测试代码难以维护、测试效率低下,影响项目质量和迭代速度。
使用后
遵循Vue.js测试最佳实践,结合Vitest和Vue Test Utils等工具,可以系统地进行组件测试。这确保了测试代码的高质量和可维护性,显著提升了测试效率和组件的稳定性,加速了开发进程。
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
用户评价 (0)
发表评价
效果
易用性
文档
兼容性
暂无评价
统计数据
安装量11.8K
评分4.5 / 5.0
版本
更新日期2026年5月23日
对比案例1 组
用户评分
4.5(156)
5
23%
4
52%
3
23%
2
2%
1
0%
为此 Skill 评分
0.0
兼容平台
🔧Claude Code
🔧OpenClaw
🔧OpenCode
🔧Codex
🔧Gemini CLI
🔧GitHub Copilot
🔧Amp
🔧Kimi CLI
时间线
创建2026年3月16日
最后更新2026年5月23日