Skip to content
This repository was archived by the owner on Oct 22, 2024. It is now read-only.

Commit 44ba892

Browse files
committed
Add a test in EventTile-test.tsx
1 parent 2f34023 commit 44ba892

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/components/views/rooms/EventTile-test.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import DMRoomMap from "../../../../src/utils/DMRoomMap";
3232
import dis from "../../../../src/dispatcher/dispatcher";
3333
import { Action } from "../../../../src/dispatcher/actions";
3434
import { IRoomState } from "../../../../src/components/structures/RoomView";
35+
import PinningUtils from "../../../../src/utils/PinningUtils.ts";
3536

3637
describe("EventTile", () => {
3738
const ROOM_ID = "!roomId:example.org";
@@ -510,4 +511,13 @@ describe("EventTile", () => {
510511
});
511512
});
512513
});
514+
515+
test("it should render a pinned message badge", async () => {
516+
jest.spyOn(PinningUtils, "isPinned").mockReturnValue(true);
517+
518+
getComponent();
519+
await act(flushPromises);
520+
521+
expect(screen.getByText("Pinned message")).toBeInTheDocument();
522+
});
513523
});

0 commit comments

Comments
 (0)