Refactor Study Desk application structure
This commit is contained in:
parent
faaccf8a7e
commit
089439ed90
145 changed files with 8087 additions and 3412 deletions
12
src/lib/validation/shareSchemas.test.ts
Normal file
12
src/lib/validation/shareSchemas.test.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
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);
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue