code: function createTimeline(numEvents, baseIndex) {
      if (numEvents === undefined) {
          numEvents = 3;
      }
      if (baseIndex === undefined) {
          baseIndex = 1;
      }
  
      // XXX: this is a horrid hack
      const timelineSet = { room: { roomId: ROOM_ID }};
      timelineSet.room.getUnfilteredTimelineSet = function() {
          return timelineSet;
      };
  
      const timeline = new EventTimeline(timelineSet);
  
      // add the events after the baseIndex first
      addEventsToTimeline(timeline, numEvents - baseIndex, false);
  
      // then add those before the baseIndex
      addEventsToTimeline(timeline, baseIndex, true);
  
      expect(timeline.getBaseIndex()).toEqual(baseIndex);
      return timeline;
  }
docs: /*
  create a timeline with a bunch (default 3) events.
  baseIndex is 1 by default.