mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-05 20:20:22 +00:00
test: tighten outbound identity normalization
This commit is contained in:
@@ -66,4 +66,20 @@ describe("resolveAgentOutboundIdentity", () => {
|
|||||||
|
|
||||||
expect(resolveAgentOutboundIdentity({} as never, "main")).toBeUndefined();
|
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: "🕶️",
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user