test(friends): drop stale origin arg from addDmChannel assertion
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 commit7f3ca4e("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 (commit277b69a) against an intermediate form of the code that was later rewritten. Drop the trailing '' so the assertion matches the current, intentional one-arg call.
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user