From 0309ceb6aa84fb492bbfd2d624b47a33f411c6e0 Mon Sep 17 00:00:00 2001 From: Valere Date: Mon, 27 Oct 2025 15:59:01 +0100 Subject: [PATCH] fix lint --- src/room/GroupCallView.test.tsx | 6 +++--- src/room/InCallView.tsx | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/room/GroupCallView.test.tsx b/src/room/GroupCallView.test.tsx index ccde45b3..4f95a327 100644 --- a/src/room/GroupCallView.test.tsx +++ b/src/room/GroupCallView.test.tsx @@ -295,11 +295,12 @@ test("Should not close widget when auto leave due to error", async () => { const user = userEvent.setup(); const widgetStopMock = vi.fn().mockResolvedValue(undefined); + const widgetSendMock = vi.fn().mockResolvedValue(undefined); const widget = { api: { setAlwaysOnScreen: vi.fn().mockResolvedValue(true), transport: { - send: vi.fn().mockResolvedValue(undefined), + send: widgetSendMock, reply: vi.fn().mockResolvedValue(undefined), stop: widgetStopMock, } as unknown as ITransport, @@ -308,7 +309,6 @@ test("Should not close widget when auto leave due to error", async () => { }; const alwaysOnScreenSpy = vi.spyOn(widget.api, "setAlwaysOnScreen"); - const transportSendSpy = vi.spyOn(widget.api.transport, "send"); const { getByText } = createGroupCallView(widget as WidgetHelpers); const leaveButton = getByText("SimulateErrorLeft"); @@ -320,7 +320,7 @@ test("Should not close widget when auto leave due to error", async () => { await flushPromises(); // But then we do not close the widget automatically expect(widgetStopMock).not.toHaveBeenCalledOnce(); - expect(transportSendSpy).not.toHaveBeenCalledOnce(); + expect(widgetSendMock).not.toHaveBeenCalledOnce(); }); test.skip("GroupCallView leaves the session when an error occurs", async () => { diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index 6f6bae93..ac0b5025 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -111,7 +111,9 @@ export interface ActiveCallProps extends Omit { e2eeSystem: EncryptionSystem; // TODO refactor those reasons into an enum - onLeft: (reason: "user" | "timeout" | "decline" | "allOthersLeft") => void; + onLeft: ( + reason: "user" | "timeout" | "decline" | "allOthersLeft" | "error", + ) => void; } export const ActiveCall: FC = (props) => {