Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Refactor unused beforeEach
Browse files Browse the repository at this point in the history
Signed-off-by: davidegirardi <16451191+davidegirardi@users.noreply.github.com>
  • Loading branch information
davidegirardi committed Jun 21, 2023
1 parent 9453991 commit 4dc7b58
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions test/components/structures/TimelinePanel-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ describe("TimelinePanel", () => {
await renderTimelinePanel();
timelineSet.addLiveEvent(ev1, {});
await flushPromises();
// @ts-ignore Simulate user activity by calling updateReadMarker on the TimelinePanel.
await timelinePanel.updateReadMarker();
});

Expand All @@ -273,20 +272,13 @@ describe("TimelinePanel", () => {
});

describe("and reading the whole timeline", () => {
beforeEach(async () => {
it("the read marker should be up to date", async () => {
await renderTimelinePanel();
timelineSet.addLiveEvent(ev1, {});
await flushPromises();

// @ts-ignore
await timelinePanel.sendReadReceipts();
// @ts-ignore This function scrolls to bottom and sends the read receipts
await timelinePanel.forgetReadMarker();
// @ts-ignore Simulate user activity by calling updateReadMarker on the TimelinePanel.
await timelinePanel.updateReadMarker();
});

it("the read marker should be up to date", async () => {
await flushPromises();
expect(timelinePanel.isReadMarkerUpToDate()).toBe(true);
});
});
Expand Down

0 comments on commit 4dc7b58

Please sign in to comment.