From cbd264f33db9ddb21b4f3e084504f4f3cedcc9bd Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 14 Mar 2026 00:59:03 +0000 Subject: [PATCH] test: tighten outbound identity normalization --- src/infra/outbound/identity.test.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/infra/outbound/identity.test.ts b/src/infra/outbound/identity.test.ts index ea1c3623fbc..6b1afc69221 100644 --- a/src/infra/outbound/identity.test.ts +++ b/src/infra/outbound/identity.test.ts @@ -66,4 +66,20 @@ describe("resolveAgentOutboundIdentity", () => { expect(resolveAgentOutboundIdentity({} as never, "main")).toBeUndefined(); }); + + it("drops blank remote avatar urls while keeping other identity fields", () => { + resolveAgentIdentityMock.mockReturnValueOnce({ + name: " Agent Smith ", + emoji: " 🕶️ ", + }); + resolveAgentAvatarMock.mockReturnValueOnce({ + kind: "remote", + url: " ", + }); + + expect(resolveAgentOutboundIdentity({} as never, "main")).toEqual({ + name: "Agent Smith", + emoji: "🕶️", + }); + }); });