title: How to mock the toastr in Angular?
body: <p>I'm not sure I'm writing a good title regarding this problem or not.
  How to mock and bypass into this 2 red line?</p>
  
  <pre><code>fit('Should call the sub entity list', () =&gt; {
  
      expect(component.subentity.length).toBe(0);
  
      spyOn(subentitysvc, 'getSubEntityList').and.returnValue(of(modelMock));
      component.getSubEntityList(1);
      fixture.detectChanges();
      expect(subentitysvc.getSubEntityList).toHaveBeenCalled();
  
      spyOn(toastr, 'error').and.callFake(() =&gt; { });
  
  })
  </code></pre>