unbreak mocks in tests
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user