title: Jasmine Angular : How to write unit test for anonymous func given as args
body: <pre><code>public listenCloseEvt() {
      this.renderer.listen(window, 'close', () =&gt; {
        this.showModal = false;
      });
  }
  </code></pre>
  <p>I am able to <code>spyOn</code> <code>render.listen</code> but I am unable to reach <code>this.showModal</code> false line on writing unit test.</p>