Agent Skills
› NeverSight/learn-skills.dev
› vue-testing-best-practices
vue-testing-best-practices
GitHub提供Vue.js测试最佳实践,涵盖Vitest、Vue Test Utils组件测试、模拟技巧及Playwright E2E测试。解决异步渲染、Pinia注入、Teleport内容查找等常见问题,指导构建稳定可靠的测试基础设施与模式。
Trigger Scenarios
Vue.js项目测试配置
组件单元测试编写
E2E测试框架选择
处理测试中的异步或状态管理问题
Install
npx skills add NeverSight/learn-skills.dev --skill vue-testing-best-practices -g -y
SKILL.md
Frontmatter
{
"name": "vue-testing-best-practices",
"author": "github.com\/vuejs-ai",
"license": "MIT",
"version": "1.0.0",
"description": "Use for Vue.js testing. Covers Vitest, Vue Test Utils, component testing, mocking, testing patterns, and Playwright for E2E testing."
}
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
Version History
- e0220ca Current 2026-07-05 20:29


