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

describe('Observable.timer', function () {
  it('schedule a value of 0 then complete', function (done) {
    var start = Date.now();
    Observable.timer(100)
      .subscribe(function (x) {
          expect(x).toBe(0);
        }, null,
        function () {
          var now = Date.now();
          expect(now - start >= 100).toBe(true, 'timer fired in ' + (now - start) + 'ms');
          done();
        });
  });
});<commit_msg>chore(test): use test marbles for Observable.timer spec<commit_after>/* globals describe, it, expect, expectObservable, hot, rxTestScheduler */
var Rx = require('../../dist/cjs/Rx');
var Observable = Rx.Observable;
var immediate = Rx.Scheduler.immediate;
var Observer = Rx.Observer;

describe('Observable.timer', function () {
  it('should schedule a value of 0 then complete', function () {
    
    var source = Observable.timer(50, undefined, rxTestScheduler);
    var expected = '-----(x|)';
    
    expectObservable(source).toBe(expected, {x: 0});
  });
});
{'fraction_non_alphanumeric': 0.16764459346186086, 'fraction_numerical': 0.010058675607711651, 'mean_word_length': 3.117241379310345, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3492985', 'n_tokens_mistral': 379, 'n_tokens_neox': 358, 'n_words': 99}