Skip to content

Commit 043d812

Browse files
committed
Only mock the call object for tests that expect it.
1 parent 644be31 commit 043d812

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/unit-tests/components/views/rooms/RoomHeader/RoomHeader-test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ describe("RoomHeader", () => {
9696
setCardSpy = jest.spyOn(RightPanelStore.instance, "setCard");
9797
jest.spyOn(ShieldUtils, "shieldStatusForRoom").mockResolvedValue(ShieldUtils.E2EStatus.Normal);
9898

99-
// Mock CallStore.instance.getCall to return a Call object with stable participants
100-
// This prevents React dependency errors without disrupting hook execution order
101-
jest.spyOn(CallStore.instance, "getCall").mockReturnValue(createMockCall());
99+
// Mock CallStore.instance.getCall to return null by default
100+
// Individual tests can override this when they need a specific Call object
101+
jest.spyOn(CallStore.instance, "getCall").mockReturnValue(null);
102102
});
103103

104104
afterEach(() => {

0 commit comments

Comments
 (0)