mirror of
https://github.com/vector-im/element-web.git
synced 2026-01-16 22:11:17 +01:00
test: fix Room-test
This commit is contained in:
parent
be7a697475
commit
59f2b138bc
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user