# Convex Test

Generate convex-test tests for the app's Convex functions.

- Repository: https://github.com/openclaw/clawhub (9543 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add openclaw/clawhub --skill convex-test -g -a claude-code -y`
Codex: `npx skills add openclaw/clawhub --skill convex-test -g -a codex -y`
Cursor: `npx skills add openclaw/clawhub --skill convex-test -g -a cursor -y`
Gemini CLI: `npx skills add openclaw/clawhub --skill convex-test -g -a gemini-cli -y`

## Description

Generate convex-test tests for the app's Convex functions.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

<!-- GENERATED from convex-agents content/capabilities/test.json, do not edit by hand. -->

# Generate Convex tests

Use convex-test + vitest to test functions against an in-memory backend: args/returns, auth paths, indexes, and scheduled functions.

## Workflow

1. Install convex-test + vitest.
2. Write tests using convexTest(schema): seed via t.run, call t.query/t.mutation, assert.
3. Cover auth (withIdentity), error paths, and scheduled functions (t.finishInProgressScheduledFunctions).
4. 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).

