diff --git a/CLAUDE.md b/CLAUDE.md index 6166566..006d159 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -14,7 +14,10 @@ Modular, self-hostable community platform built on the AT Protocol. ### Commands -Check project TypeScript types with `bunx tsc --emit` or rely on the LSP plugin. +- `bunx tsc --emit`: Check project TypeScript types +- `bun run fmt`: Foramt with oxfmt +- `bun run test`: Run unit tests +- `bun run test:e2e`: Run end-to-end tests ## Architecture diff --git a/packages/core/src/__tests__/sphere-schemas.test.ts b/packages/core/src/__tests__/sphere-schemas.test.ts index 4182ae5..60bd93d 100644 --- a/packages/core/src/__tests__/sphere-schemas.test.ts +++ b/packages/core/src/__tests__/sphere-schemas.test.ts @@ -60,22 +60,22 @@ describe("updateSphereSchema", () => { }); describe("inviteMemberSchema", () => { - it("accepts a valid DID with default role", () => { - const result = inviteMemberSchema.parse({ did: "did:plc:abc123" }); + it("accepts a valid identifier with default role", () => { + const result = inviteMemberSchema.parse({ identifier: "did:plc:abc123" }); expect(result.role).toBe("member"); }); it("accepts admin role", () => { - const result = inviteMemberSchema.parse({ did: "did:web:example.com", role: "admin" }); + const result = inviteMemberSchema.parse({ identifier: "did:web:example.com", role: "admin" }); expect(result.role).toBe("admin"); }); - it("rejects DID not starting with 'did:'", () => { - expect(() => inviteMemberSchema.parse({ did: "plc:abc123" })).toThrow(); + it("rejects empty identifier", () => { + expect(() => inviteMemberSchema.parse({ identifier: "" })).toThrow(); }); it("rejects owner role", () => { - expect(() => inviteMemberSchema.parse({ did: "did:plc:abc", role: "owner" })).toThrow(); + expect(() => inviteMemberSchema.parse({ identifier: "did:plc:abc", role: "owner" })).toThrow(); }); });