chore: initial commit — monorepo ReadaBook (API NestJS, web PWA, Docker)
This commit is contained in:
14
packages/shared/src/index.test.ts
Normal file
14
packages/shared/src/index.test.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { BootstrapAdminSchema, BookQuerySchema } from "./index.js";
|
||||
|
||||
describe("shared contracts", () => {
|
||||
it("validates bootstrap admin payloads", () => {
|
||||
expect(BootstrapAdminSchema.parse({ email: "admin@example.com", password: "password123" }).email).toBe(
|
||||
"admin@example.com"
|
||||
);
|
||||
});
|
||||
|
||||
it("normalizes catalogue query defaults", () => {
|
||||
expect(BookQuerySchema.parse({}).limit).toBe(50);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user