Home/Testing & QA/convex-test
C

convex-test

by @convexv
4.6(120)

Generates tests for an app's Convex functions using convex-test and vitest against an in-memory backend. It covers argument and return validation, authentication paths via withIdentity, index lookups, error branches, and scheduled functions finished with t.finishInProgressScheduledFunctions. This Skill helps developers get deterministic backend tests running locally without touching a live deployment, so permission and edge-case bugs surface early, before they reach production.

convextestingvitestunit-testingbackendGitHub
Installation
npx skills add https://github.com/convex/agent-skills --skill convex-test
compare_arrows

Before / After Comparison

1 组
Before

Developers writing tests by hand must first figure out in-memory backend setup, how to inject an identity, and how to trigger scheduled functions. Auth and error branches are usually skipped, and verification depends on manual trial runs against a live deployment.

After

This Skill produces runnable convex-test + vitest cases covering args and returns, auth and error paths, indexes, and scheduled functions. Everything runs locally on an in-memory backend with deterministic results.

SKILL.md

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

User Reviews (0)

Write a Review

Effect
Usability
Docs
Compatibility

No reviews yet

Statistics

Installs34.9K
Rating4.6 / 5.0
Version
Updated2026年10月23日
Comparisons1

User Rating

4.6(120)
5
37%
4
43%
3
13%
2
5%
1
2%

Rate this Skill

0.0

Compatible Platforms

🤖claude-code

Timeline

Created2026年10月17日
Last Updated2026年10月23日
🎁 Agent Knowledge Cards
Survey