Exosphere is a set of small, modular, self-hostable community tools built on the AT Protocol. app.exosphere.site
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

test: fix did tests

Hugo b14efa92 b5b3f77e

+10 -7
+4 -1
CLAUDE.md
··· 14 14 15 15 ### Commands 16 16 17 - Check project TypeScript types with `bunx tsc --emit` or rely on the LSP plugin. 17 + - `bunx tsc --emit`: Check project TypeScript types 18 + - `bun run fmt`: Foramt with oxfmt 19 + - `bun run test`: Run unit tests 20 + - `bun run test:e2e`: Run end-to-end tests 18 21 19 22 ## Architecture 20 23
+6 -6
packages/core/src/__tests__/sphere-schemas.test.ts
··· 60 60 }); 61 61 62 62 describe("inviteMemberSchema", () => { 63 - it("accepts a valid DID with default role", () => { 64 - const result = inviteMemberSchema.parse({ did: "did:plc:abc123" }); 63 + it("accepts a valid identifier with default role", () => { 64 + const result = inviteMemberSchema.parse({ identifier: "did:plc:abc123" }); 65 65 expect(result.role).toBe("member"); 66 66 }); 67 67 68 68 it("accepts admin role", () => { 69 - const result = inviteMemberSchema.parse({ did: "did:web:example.com", role: "admin" }); 69 + const result = inviteMemberSchema.parse({ identifier: "did:web:example.com", role: "admin" }); 70 70 expect(result.role).toBe("admin"); 71 71 }); 72 72 73 - it("rejects DID not starting with 'did:'", () => { 74 - expect(() => inviteMemberSchema.parse({ did: "plc:abc123" })).toThrow(); 73 + it("rejects empty identifier", () => { 74 + expect(() => inviteMemberSchema.parse({ identifier: "" })).toThrow(); 75 75 }); 76 76 77 77 it("rejects owner role", () => { 78 - expect(() => inviteMemberSchema.parse({ did: "did:plc:abc", role: "owner" })).toThrow(); 78 + expect(() => inviteMemberSchema.parse({ identifier: "did:plc:abc", role: "owner" })).toThrow(); 79 79 }); 80 80 }); 81 81