testing-vue-vitest
Skill8 starsChanged 6 months agoMITView on GitHub
为 Vue 3 + Vitest 项目补齐可维护测试,适用于用户要求补单测、补组件测试、补页面测试、修 Vitest、测试表单/表格/权限显隐/组合式函数时使用。
Files
Testing Vue Vitest
目标
为 Vue 3 项目补齐有价值、低脆弱的测试。不要为了覆盖率堆测试,优先覆盖核心路径和高风险分支。
工作方式
- 先阅读目标组件、组合式函数、API 封装和已有测试写法。
- 识别测试层级:工具函数、composable、组件、页面行为。
- 优先覆盖核心路径,再补异常、权限、空数据和回归场景。
- mock 外部依赖,但不要 mock 被测逻辑本身。
- 断言用户可感知结果,少断言实现细节。
- 跑测试并修正不稳定断言。
推荐覆盖
- 表单校验和提交
- 搜索、重置、分页
- 空数据和接口异常
- 弹窗打开、回显、关闭
- 权限按钮显隐
- composable 的状态变化
- 关键事件 emit
参考
需要测试模式示例时读取 references/test-patterns.md。
In this repository17 other files it gives its agents.
- code-quality-reviewSkill
- code-reviewSkill
- create-list-pageSkill
- diagnoseSkill
- dynamic-form-knowledgeSkill
- feature-doc-maintainerSkill
- frontend-designSkill
- git-commit-messageSkill
- grill-with-docsSkill
- improve-codebase-architectureSkill
- manual-test-casesSkill
- page-reviewSkill
- requirement-analysisSkill
- requirement-story-writerSkill
- tddSkill
- testcase-excelSkill
- vue-component-reviewSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

