test: fix Room-test

This commit is contained in:
Florian Duros 2026-01-08 10:59:34 +01:00 committed by Florian Duros
parent be7a697475
commit 59f2b138bc

View File

@ -39,12 +39,14 @@ describe("Room", () => {
const room = new Room(sdkRoom);
const fn = jest.fn();
const onSpy = jest.spyOn(sdkRoom, "on");
const offSpy = jest.spyOn(sdkRoom, "off");
room.name.watch(fn);
expect(sdkRoom.on).toHaveBeenCalledTimes(1);
expect(onSpy).toHaveBeenCalledTimes(1);
room.name.unwatch(fn);
expect(sdkRoom.off).toHaveBeenCalledTimes(1);
expect(offSpy).toHaveBeenCalledTimes(1);
});
});
});