title: how to test clearInterval on karma jasmine
body: <p>I have a function whose purpose is to make a count of numbers, from 0 to a number I want. I'm trying to test this function through jasmine karma but I can't cover clearInterval</p>
  <p>Can anyone help me?</p>
  <p>the function:</p>
  <pre><code>        for (let i = 0; i &lt; this.arrCount.length; i++) {
              this.arrStop[i] = setInterval(() =&gt; {
                  this.arrCount[i]++;
                  Iif (this.arrCount[i] == this.arrLimit[i]) {
                      clearInterval(this.arrStop[i]);
                  }
              }, this.arrTime[i]);
          }
      }
  
  
    [![thath is the line i want to cover][1]][1]
  
  
    [1]: https://i.stack.imgur.com/hiFGw.png
  </code></pre>