Skip to content
Backend
Command

/test

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

From plugin
convex-agent-plugins
11729 skills29 commands

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/test

Context preview

What this command does when you run it.

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

Command definition

test.md
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.

Steps

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).
Ships withconvex-agent-plugins

Official Convex plugins for AI coding agents, providing comprehensive development tools for building reactive backends with TypeScript. Supported Agents: Cursor, Claude Code (more coming soon)

Get the whole plugin

Other commands on convex-agent-plugins.