Skip to main content
Glama
auth.test.ts673 B
import { convexTest } from "convex-test"; import { expect, test } from "vitest"; import { api } from "./_generated/api"; import schema from "./schema"; test("authenticated functions", async () => { const t = convexTest(schema, modules); const asSarah = t.withIdentity({ name: "Sarah" }); await asSarah.mutation(api.tasks.create, { text: "Add tests" }); const sarahsTasks = await asSarah.query(api.tasks.list); expect(sarahsTasks).toMatchObject([{ text: "Add tests" }]); const asLee = t.withIdentity({ name: "Lee" }); const leesTasks = await asLee.query(api.tasks.list); expect(leesTasks).toEqual([]); }); const modules = import.meta.glob("./**/*.ts");

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/get-convex/convex-backend'

If you have feedback or need assistance with the MCP directory API, please join our Discord server