<commit_before>/* globals describe, it, expect */
var Rx = require('../../dist/cjs/Rx');
var Observable = Rx.Observable;

describe('Observable.prototype.takeUntil()', function () {
  it('should take values until another Observable emits', function (done) {
    var expected = [0, 1, 2, 3, 4];
    var i = 0;
    var nextSpy = jasmine.createSpy('nextSpy');

    Observable.timer(0, 100)
      .takeUntil(Observable.timer(450))
      .subscribe(nextSpy, null, function () {
        expect(nextSpy.calls.count()).toBe(5);
        expected.forEach(function (v) {
          expect(nextSpy.calls.argsFor(v)[0]).toBe(v);
        });
        done();
      });
  });
});<commit_msg>chore(test): use test marbles for takeUntil operator spec<commit_after>/* globals describe, it, expect, hot, cold, expectObservable */
var Rx = require('../../dist/cjs/Rx');
var Observable = Rx.Observable;

describe('Observable.prototype.takeUntil()', function () {
  it('should take values until another Observable emits', function () {
    var source = hot('--a--b--c--d--e--f--g--|');
    var other =  hot('-------------z--|');
    var expected =   '--a--b--c--d-|'; 
    
    expectObservable(source.takeUntil(other)).toBe(expected);
  });
});
{'fraction_non_alphanumeric': 0.2, 'fraction_numerical': 0.012295081967213115, 'mean_word_length': 2.9901960784313726, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3376140', 'n_tokens_mistral': 407, 'n_tokens_neox': 390, 'n_words': 87}