title: Angular8 Unitest error: 'Automatic conversion to Blob is not supported for response type.'
body: <p>I am writing an httpGet call to get images as blob here is the call:</p>
  <pre><code>      public getImage(link: string): Observable&lt;any&gt; {
      
          return this.http.get&lt;any&gt;(this.createUrl('storage/' + link ), { headers: this.createHeaders(), 
          responseType: 'blob' as 'json' });
        }
  </code></pre>
  <p>This is my unittest:</p>
  <pre><code>  it('should get the images', () =&gt; {
      let response = {};
      service.getImage('testImage').subscribe(
        data =&gt; {
          expect(data).toEqual(response, 'should return expected data');
  
          const req = httpMock.expectOne(`https://api/storage/testImage`);
          expect(req.request.method).toBe('GET');
          req.flush(response);
       
        });     
    });
  </code></pre>
  <p>When I write the test like above I get the error: &quot;Expected no open requests, found 1:&quot;</p>
  <p>If I put this code:</p>
  <p>const req = httpMock.expectOne(<code>https://api/storage/testImage</code>);
  expect(req.request.method).toBe('GET');
  req.flush(response);</p>
  <p>outside of the subscription I get the error : &quot;Automatic conversion to Blob is not supported for response type.&quot;</p>
  <p>Does someone knows how to fix this?</p>