import { describe, expect, it } from "vitest"; import { collectLocalProfileSignals, mergeFullUserProfileMemory } from "./user-profile-harvest"; import { mergeRelationshipContractIntoMemory, RELATIONSHIP_SECTION, } from "./user-relationship-contract"; describe("user-relationship-contract", () => { it("adds relationship section once", () => { const once = mergeRelationshipContractIntoMemory("# Space memory\n"); expect(once).toContain(RELATIONSHIP_SECTION); expect(once).toContain("Not yes-men"); expect(mergeRelationshipContractIntoMemory(once)).toBe(once); }); it("is included in full profile harvest merge", () => { const merged = mergeFullUserProfileMemory( "# Space memory\n", collectLocalProfileSignals({ name: "Ingo", email: "i@example.com", defaultProvider: null, defaultModel: null, computerHost: null, }), ); expect(merged).toContain(RELATIONSHIP_SECTION); expect(merged).toContain("Never creepy"); }); });