Agent Skills
› openclaw/clawhub
› convex-test
convex-test
GitHub生成基于 convex-test 和 vitest 的 Convex 函数测试,覆盖参数、返回值、认证路径及定时任务。
触发场景
需要为 Convex 函数编写单元测试
请求使用 in-memory 后端进行确定性测试
安装
npx skills add openclaw/clawhub --skill convex-test -g -y
SKILL.md
Frontmatter
{
"name": "convex-test",
"description": "Generate convex-test tests for the app's Convex functions."
}
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).
版本历史
- d6a8c68 当前 2026-08-20 02:44


