Testing Patterns

Project test patterns. Applies when writing tests or mocking Convex. Use when this capability is needed.

tomevault-io Updated

File contents

Testing

  • Framework: Vitest + bun test
  • Files: *.test.ts colocated with source
  • Convex: use convex-test for backend tests
  • Coverage: bun test --coverage

Convex Mocking

import { convexTest } from "convex-test"
import schema from "./schema"

const t = convexTest(schema)
await t.run(async (ctx) => {
  // test mutations/queries here
})

Converted and distributed by TomeVault — claim your Tome and manage your conversions.

tomevault-io/skills-registry/tree/main/jasondocton--rad-claude--testing-patterns commit b0b26cf0d8

Frequently asked questions

npx skillmds@latest add tomevault-io/testing-patterns-13