# convex-test

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

Skill by Convex. Category: Testing.

## Install

Project (for this project only):

```sh
npx skills add get-convex/agent-skills --skill convex-test
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

Global (for every project on this machine):

```sh
npx skills add get-convex/agent-skills --skill convex-test -g
```

Works with: Claude Code, Codex CLI, Cursor, Antigravity, Copilot CLI, opencode.

## Tags

- Runs on your computer: It runs as a program on your machine, with your access.

## Security audits

- Gen Agent Trust Hub: Pass
- Socket: Pass
- Snyk: Pass

Installs: 30510. Installs counted by skills.sh. [Open on skills.sh](https://www.skills.sh/get-convex/agent-skills/convex-test)

## Source

[Open the source](https://github.com/get-convex/agent-skills/tree/HEAD/skills/convex-test). Checked 2026-10-10. This summary may contain AI-generated text, so it can be wrong. Check the source before you rely on it.

## SKILL.md

````markdown
---
name: convex-test
description: "Generate convex-test tests for the app's Convex functions."
---

<!-- 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).
````

- Previous: [convex-agent](https://syn4pse.dev/terminal/convex-agent.md)
- Next: [convex-insights](https://syn4pse.dev/terminal/convex-insights.md)
- [Terminal](https://syn4pse.dev/terminal.md)
- [Suggest a change](mailto:terminal@syn4pse.dev?subject=Terminal%20suggestion)
