Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bwindels committed Nov 13, 2018
1 parent ece549b commit 734a7ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/components/structures/MessagePanel-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -45,7 +47,7 @@ const WrappedMessagePanel = React.createClass({
},

render: function() {
return <MessagePanel {...this.props} />;
return <MessagePanel room={room} {...this.props} />;
},
});

Expand Down
2 changes: 2 additions & 0 deletions test/components/structures/TimelinePanel-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 734a7ef

Please sign in to comment.