You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-01 09:58:03 +03:00
Add stub for getVisibleRooms()
Fixes the tests
This commit is contained in:
@@ -94,6 +94,7 @@ describe('RoomList', () => {
|
|||||||
createRoom({tags: {'m.lowpriority': {}}, name: 'Some unimportant room'}),
|
createRoom({tags: {'m.lowpriority': {}}, name: 'Some unimportant room'}),
|
||||||
createRoom({tags: {'custom.tag': {}}, name: 'Some room customly tagged'}),
|
createRoom({tags: {'custom.tag': {}}, name: 'Some room customly tagged'}),
|
||||||
];
|
];
|
||||||
|
client.getVisibleRooms = client.getRooms;
|
||||||
|
|
||||||
const roomMap = {};
|
const roomMap = {};
|
||||||
client.getRooms().forEach((r) => {
|
client.getRooms().forEach((r) => {
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ export function createTestClient() {
|
|||||||
getPushActionsForEvent: sinon.stub(),
|
getPushActionsForEvent: sinon.stub(),
|
||||||
getRoom: sinon.stub().returns(mkStubRoom()),
|
getRoom: sinon.stub().returns(mkStubRoom()),
|
||||||
getRooms: sinon.stub().returns([]),
|
getRooms: sinon.stub().returns([]),
|
||||||
|
getVisibleRooms: sinon.stub().returns([]),
|
||||||
getGroups: sinon.stub().returns([]),
|
getGroups: sinon.stub().returns([]),
|
||||||
loginFlows: sinon.stub(),
|
loginFlows: sinon.stub(),
|
||||||
on: sinon.stub(),
|
on: sinon.stub(),
|
||||||
|
|||||||
Reference in New Issue
Block a user