Agent Skills
› openclaw/clawhub
› convex-test
convex-test
GitHub生成针对 Convex 函数的测试用例,结合 vitest 使用 in-memory 后端验证参数、返回值、认证路径及定时任务,确保测试确定性与覆盖度。
Trigger Scenarios
需要为 Convex 函数编写单元测试
需要测试 Convex 的认证或错误处理逻辑
需要验证 Convex 定时任务的执行
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


