Agent Skills
› openclaw/clawhub
› convex-test
convex-test
GitHub用于生成 Convex 函数的单元测试,结合 vitest 在内存后端中测试参数、返回值、认证路径及定时任务,确保测试确定性并覆盖异常场景。
Trigger Scenarios
需要为 Convex 函数编写单元测试
使用 vitest 进行前端或全栈应用的后端逻辑测试
Install
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).
Version History
- d6a8c68 Current 2026-08-20 02:44


