test: fix Room-test

This commit is contained in:
Florian Duros 2026-01-08 10:59:34 +01:00
parent f70fcf7806
commit e843501775
No known key found for this signature in database
GPG key ID: A5BBB4041B493F15

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);
});
});
});