hunk.code_window: var Rx = require('../../dist/cjs/Rx');
   var Observable = Rx.Observable;
   describe('Observable.prototype.delay()', function () {
     it('should delay by 100ms', function (done) {
       var time = Date.now();
       Observable
         .of(42)
         .delay(100)
         .subscribe(function (x) {
           expect(Date.now() - time >= 100).toBe(true);
         }, null, function() {
           expect(Date.now() - time >= 100).toBe(true);
           done();
         });
     });
   });
  
hunk.labels: keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace keep keep
hunk.after_edit:   it('should delay by specified timeframe', function () {
       var source = hot('--a--|');
       var expected =   '-----a--|';
       expectObservable(source.delay(30, rxTestScheduler)).toBe(expected);
  
hunk.file_path: spec/operators/delay-spec.js
hunk.type: replace
file: /* globals describe, it, expect */
  var Rx = require('../../dist/cjs/Rx');
  
  var BehaviorSubject = Rx.BehaviorSubject;
  var nextTick = Rx.Scheduler.nextTick;
  
  describe('BehaviorSubject', function() {
    it('should extend Subject', function(done){
      var subject = new BehaviorSubject(null);
      expect(subject instanceof Rx.Subject).toBe(true);
      done();
    });
    
    it('should start with an initialization value', function(done) {
      var subject = new BehaviorSubject('foo');
      var expected = ['foo', 'bar'];
      var i = 0;
      
      subject.subscribe(function(x) {
        expect(x).toBe(expected[i++]);
      }, null, done);
  
      subject.next('bar');
      subject.complete();
    });
  });