
Convex Test
If you're building on Convex and your tests are either missing or hitting a live deployment, this skill walks you through writing them against convex-test, an in-memory backend, using vitest as the runner. It covers the parts that usually get skipped: auth paths via withIdentity, error cases alongside the happy path, and scheduled functions, which you can flush with t.finishInProgressScheduledFunctions instead of waiting on real time. The workflow is simple: seed data with t.run, call your queries and mutations, assert on results. The main thing to watch is determinism. The skill steers you away from real clocks and network calls, which is the right call, but you'll still need to think about how your own functions read time. Worth running once on a function you already understand so you can judge the output.
- skills.sh installs
- 41.1K
- GitHub stars
- 69
- last updated
- Oct 26, 2026
Install
$ npx -y skills add convex/agent-skills --skill convex-test --agent claude-codeInstalls into .claude/skills of the current project.
Files
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).
Sponsors
Details
- Repository
- github.com/convex/agent-skills
- Categories
- Testing & QA, AI & Agent Building, Databases
- First seen
- Oct 26, 2026
More from convex/agent-skills
All 30- Convex Agent41.1K
- Convex Add41.1K
- Convex Cost41.1K
- Convex Migrate Rehearse41.1K
- Convex Launch Readiness41K
- Convex Explain App41K
- Convex Backup41K
- Convex Insights41K
- Convex Verify41K
- Convex Domains41K
- Convex Billing41K
- Convex Monitor41K
- Convex Improve Convex Plugin41K
- Convex Seed41K
- Convex Self Heal41K
- Convex Suggest41K
- Convex Sentinel40.9K
- Convex Expert41.4K
- Convex Auth41.4K
- Convex Authz41.3K
- Convex Migrate41.3K
- Convex Reviewer41.3K
- Convex Docs41.3K
- Convex Design41.2K