C
convex-test
by @convexv
4.6(120)
为应用的 Convex 函数生成基于 convex-test 与 vitest 的测试:在内存后端中覆盖参数与返回值、鉴权路径、索引查询以及定时函数。该技能让开发者在本地快速获得确定性的后端测试,无需连接线上部署,从而更早暴露权限与边界缺陷。
安装方式
npx skills add https://github.com/convex/agent-skills --skill convex-testcompare_arrows
Before / After 效果对比
1 组使用前
开发者手写测试时,要自己研究内存后端怎么初始化、鉴权身份如何注入、定时函数怎么触发,鉴权与错误分支常被漏掉,只能靠线上部署手动试错,一次回归验证动辄一个多小时。
使用后
此技能直接产出可运行的 convex-test + vitest 用例,覆盖参数与返回值、鉴权与错误路径、索引和定时函数,本地内存后端即可验证,测试保持确定性,几分钟内就能拿到可信的回归结果。
SKILL.md
Generate Convex tests
Use convex-test + vitest to test functions against an in-memory backend: args/returns, auth paths, indexes, and scheduled functions.
Workflow
- Install convex-test + vitest.
- Write tests using convexTest(schema): seed via t.run, call t.query/t.mutation, assert.
- Cover auth (withIdentity), error paths, and scheduled functions (t.finishInProgressScheduledFunctions).
- Run vitest; keep tests deterministic.
Rules
- Use convex-test (in-memory), not a live deployment.
- Cover auth + error paths, not just the happy path.
- Keep tests deterministic (no real time/network).
用户评价 (0)
发表评价
效果
易用性
文档
兼容性
暂无评价
统计数据
安装量34.9K
评分4.6 / 5.0
版本
更新日期2026年10月23日
对比案例1 组
用户评分
4.6(120)
5
37%
4
43%
3
13%
2
5%
1
2%
为此 Skill 评分
0.0
兼容平台
🤖claude-code
时间线
创建2026年10月17日
最后更新2026年10月23日