import { describe, expect, it } from "vitest"; import { shareTargetSchema } from "./shareSchemas"; describe("shareTargetSchema", () => { it.each(["DECK", "QUIZ", "GROUP"])("accepts target type %s", (targetType) => { expect(shareTargetSchema.safeParse({ targetType, contentId: "id" }).success).toBe(true); }); it.each(["", "CLASS", "deck", null])("rejects target type %s", (targetType) => { expect(shareTargetSchema.safeParse({ targetType, contentId: "id" }).success).toBe(false); }); });