From ae5bdaa338c66159dd872b3a45044df06a5443a9 Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Thu, 23 Apr 2026 02:28:57 +0200 Subject: [PATCH] test(friends): drop stale origin arg from addDmChannel assertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DM "Message button" test asserted addDmChannel was called with two arguments — the channel and an empty-string origin — but the assertion has been stale since commit 7f3ca4e ("route DM creation to home instance with federated identity", 2026-04-01). That refactor made FriendsPage always route DM creation through the home api client and dropped the second argument from the addDmChannel call because the remote friend's instanceOrigin no longer applies — home-created DMs don't need a channelOriginMap entry (lookups default to '' for missing keys; remote- delivered DMs still get their origin tagged by useWebSocket). The two-arg assertion was introduced on 2026-03-25 (commit 277b69a) against an intermediate form of the code that was later rewritten. Drop the trailing '' so the assertion matches the current, intentional one-arg call. --- packages/web/src/components/chat/FriendsPage.test.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web/src/components/chat/FriendsPage.test.tsx b/packages/web/src/components/chat/FriendsPage.test.tsx index 422129d6..662e6a76 100644 --- a/packages/web/src/components/chat/FriendsPage.test.tsx +++ b/packages/web/src/components/chat/FriendsPage.test.tsx @@ -322,7 +322,7 @@ describe('FriendsPage', () => { }); await waitFor(() => { - expect(mockAddDmChannel).toHaveBeenCalledWith(expect.objectContaining({ id: 'dm-channel-99' }), ''); + expect(mockAddDmChannel).toHaveBeenCalledWith(expect.objectContaining({ id: 'dm-channel-99' })); }); await waitFor(() => {