From 734a7ef6c880f32ea440bff5c6afd9954e50d851 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 13 Nov 2018 09:34:54 +0100 Subject: [PATCH] fix tests --- test/components/structures/MessagePanel-test.js | 4 +++- test/components/structures/TimelinePanel-test.js | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test/components/structures/MessagePanel-test.js b/test/components/structures/MessagePanel-test.js index e7176e2c16..0a51cb8918 100644 --- a/test/components/structures/MessagePanel-test.js +++ b/test/components/structures/MessagePanel-test.js @@ -26,11 +26,13 @@ const sdk = require('matrix-react-sdk'); const MessagePanel = sdk.getComponent('structures.MessagePanel'); import MatrixClientPeg from '../../../src/MatrixClientPeg'; +import Matrix from 'matrix-js-sdk'; const test_utils = require('test-utils'); const mockclock = require('mock-clock'); let client; +const room = new Matrix.Room(); // wrap MessagePanel with a component which provides the MatrixClient in the context. const WrappedMessagePanel = React.createClass({ @@ -45,7 +47,7 @@ const WrappedMessagePanel = React.createClass({ }, render: function() { - return ; + return ; }, }); diff --git a/test/components/structures/TimelinePanel-test.js b/test/components/structures/TimelinePanel-test.js index ea62d427bc..01ea6d8421 100644 --- a/test/components/structures/TimelinePanel-test.js +++ b/test/components/structures/TimelinePanel-test.js @@ -82,6 +82,8 @@ describe('TimelinePanel', function() { sandbox = test_utils.stubClient(sandbox); room = sinon.createStubInstance(jssdk.Room); + room.currentState = sinon.createStubInstance(jssdk.RoomState); + room.currentState.members = {}; room.roomId = ROOM_ID; timelineSet = sinon.createStubInstance(jssdk.EventTimelineSet);