title: How do I test a function that returns an observable using timed intervals in rxjs 5?
body: <p>For example, I have a function like this:</p>
  
  <pre><code>export function timeRange(start: number, end: number): Rx.Observable&lt;number&gt; {
    return Rx.Observable.interval(1000)
    .map(n =&gt; n + start)
    .take(end - start + 1)
  }
  </code></pre>
  
  <p>And I had a unit test that ran timeRange(10, 100) and asserted values against it.</p>
  
  <p>The problem is the time intervals would make my test too long to run.  </p>
  
  <p>How would you reduce the time interval without touching the function itself?</p>
  
  <p>I tried reading the docs on schedulers but I didn't get it.</p>