What problem does it solve?
Writing tests for Convex backend functions often requires a live deployment, making tests slow, flaky, and hard to run in CI. This Skill guides the generation of deterministic, in-memory tests for queries, mutations, auth paths, and scheduled functions.
Core Features & Use Cases
- In-Memory Testing: Uses convex-test with vitest to run functions against an in-memory backend instead of a live deployment.
- Comprehensive Coverage: Covers argument validation, return values, auth flows via withIdentity, error paths, indexes, and scheduled functions via t.finishInProgressScheduledFunctions.
- Deterministic Execution: Enforces tests with no real time or network dependencies so results are reproducible.
- Use Case: After adding a new mutation to your Convex app, generate a vitest suite that seeds data with t.run, calls the mutation via t.mutation, and asserts both success and unauthorized-access behavior.
Quick Start
Generate convex-test tests for my Convex functions covering auth, error paths, and scheduled functions using vitest.