hunk.code_window:     var expected = [1, 2, 3, 4];
       var i = 0;
       var source = Observable.of(1, 2, 3, 4).publishReplay();
       source.subscribe(
         function (x) {
           expect(x).toBe(expected[i++]);
         },
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit:     var source = Observable.of(1, 2, 3, 4).publishReplay(1);
       var results = [];
  
hunk.file_path: spec/operators/publishReplay-spec.js
hunk.type: replace
file: var RxOld = require('rx');
  var RxNew = require('../../../../index');
  
  module.exports = function range(suite) {
      // add tests
  
    var oldRangeWithImmediateScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.immediate);
    var newRangeWithImmediateScheduler = RxNew.Observable.range(0, 25);
  
    function _next(x) { }
    function _error(e) { }
    function _complete() { }
    return suite
      .add('old range with immediate scheduler', function () {
        oldRangeWithImmediateScheduler.subscribe(_next, _error, _complete);
      })
      .add('new range with immediate scheduler', function () {
        newRangeWithImmediateScheduler.subscribe(_next, _error, _complete);
      });
  };