title: NOT mocking HttpClient in Angular 6 tests
body: <p>I'm creating a service that loads and sends data over HTTP and I created some tests that need to use real HttpClient (NOT mocked).</p>
  
  <p>So, here's how it looks like:</p>
  
  <pre><code>describe("My3rdPartyConnectedServiceTests", () =&gt; {
    beforeEach(() =&gt; {
      TestBed.configureTestingModule({
        imports: [HttpClient],
        providers: [My3rdPartyConnectedService]
      });
    });
  
    beforeEach(async(() =&gt; {
      const http = TestBed.get(HttpClient);
  
      http.delete("http://localhost:22213/api/somemethod").subscribe(() =&gt; {
  …
      });
    }));
  </code></pre>
  
  <p>and the tests code goes. But when I run the tests I get:</p>
  
  <blockquote>
    <blockquote>
      <p>Unexpected value 'HttpClient' imported by the module 'DynamicTestModule'. Please add a @NgModule annotation.</p>
    </blockquote>
  </blockquote>
  
  <p>So how can I send requests inside my tests?</p>
  
  <p>PS. Now, if you think I shouldn't be doing this in tests at all, you're wrong. These tests and the service actually do some work that involves third-part REST API.</p>