Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2024-12-19 16:30:17 +00:00
parent 40d2c9bf2b
commit 1fb8c17c36
5 changed files with 19 additions and 19 deletions

View File

@@ -338,19 +338,18 @@ describe("<RoomSummaryCard />", () => {
});
it("does not show public room label for a DM", async () => {
mockClient.getAccountData.mockImplementation(
(eventType) =>
({
[EventType.Direct]: new MatrixEvent({
type: EventType.Direct,
content: {
"@bob:sesame.st": ["some-room-id"],
// this room is a DM with ernie
"@ernie:sesame.st": ["some-other-room-id", room.roomId],
},
}),
})[eventType],
);
mockClient.getAccountData.mockImplementation((eventType) => {
if (eventType === EventType.Direct) {
return new MatrixEvent({
type: EventType.Direct,
content: {
"@bob:sesame.st": ["some-room-id"],
// this room is a DM with ernie
"@ernie:sesame.st": ["some-other-room-id", room.roomId],
},
});
}
});
getComponent();
await flushPromises();