diff --git a/spec/unit/event-timeline.spec.js b/spec/unit/event-timeline.spec.js index f1a8f0109..8cb2f2e48 100644 --- a/spec/unit/event-timeline.spec.js +++ b/spec/unit/event-timeline.spec.js @@ -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); }); diff --git a/spec/unit/timeline-window.spec.js b/spec/unit/timeline-window.spec.js index f0f101ede..d04f6b585 100644 --- a/spec/unit/timeline-window.spec.js +++ b/spec/unit/timeline-window.spec.js @@ -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