unbreak mocks in tests

This commit is contained in:
Matthew Hodgson
2016-09-12 15:52:10 +01:00
parent 85b2e5d758
commit 8a848deddc
2 changed files with 6 additions and 1 deletions
+4 -1
View File
@@ -16,8 +16,11 @@ describe("EventTimeline", function() {
beforeEach(function() {
utils.beforeEach(this);
// XXX: this is a horrid hack; should use sinon or something instead
// XXX: this is a horrid hack; should use sinon or something instead to mock
var timelineSet = { room: { roomId: roomId }};
timelineSet.room.getUnfilteredTimelineSet = function() { return timelineSet; };
timeline = new EventTimeline(timelineSet);
});
+2
View File
@@ -20,6 +20,8 @@ function createTimeline(numEvents, baseIndex) {
// XXX: this is a horrid hack
var timelineSet = { room: { roomId: ROOM_ID }};
timelineSet.room.getUnfilteredTimelineSet = function() { return timelineSet; };
var timeline = new EventTimeline(timelineSet);
// add the events after the baseIndex first