title: How to print log during karma Testing
body: <p>I am a beginner for Angular, recently I started working on Angular.
  I have written some unit testing code, as follows.</p>
  
  <pre><code>it('fetch data should be correct',
  inject(
    [HttpTestingController, Service2Service],
    (
      httpMock: HttpTestingController,
      dataService: Service2Service
    ) =&gt;{
          dataService.getData().subscribe((event: HttpEvent&lt;any&gt;) =&gt; {
            console.info("HttpEventType.Response",HttpEventType.Response);
            switch (event.type) {
              case HttpEventType.Response:{
                console.log("body",event.body);
                expect(event.body.length).toEqual(110);
              }
            }
          });
        }
    )
  </code></pre>
  
  <p>);</p>
  
  <p>I am trying to print using console.log but it not printing on console.
  Kindly suggest another way to print log.</p>
  
  <p>Thanks in advance.</p>