title: Cannot read property 'pipe' of undefined whilst testing httpclient call
body: <p>I am trying to unit test some my code in an ionic4 app the code, calls an endpoint and maps the reponse to an object it also adds a tap, so that I can return this.faults as an observable from my dataservice.</p>
  
  <pre><code>fetchFaults(): Observable&lt;Fault[]&gt;
  {
  return this.http.get&lt;{data: Fault[]}&gt;('https://server/api/faults')
    .pipe(tap((data) =&gt; this.faults = data.data) // cache
        , map((data) =&gt; data.data)); // return just Fault[] from data.data to the subscriber
  }
  </code></pre>
  
  <p>Which I am trying to test with </p>
  
  <pre><code>  describe('fetchFaults', () =&gt; {
      it('makes expected calls', () =&gt; {
        const httpClientStub: HttpClient = TestBed.get(HttpClient);
        spyOn(httpClientStub, 'get');
        service.fetchFaults();
        expect(httpClientStub.get).toHaveBeenCalled();
      });
    });
  </code></pre>
  
  <p>but I am getting the error Cannot read property 'pipe' of undefined do I need to return anything from the httpstub?</p>