title: HttpTestingController expectOne not working when actual request is nested within a promise
body: <p>I am trying to unit test a service which gets a value from another service (returns a Promise) then execute http GET request.</p>
  
  <p>I am using HttpTestingController from @angular/common/http/testing to mock the http request. Here is the test and prod code :</p>
  
  <p><strong>tested.service.spec.ts</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>it('should get base url from indexedDb then execute http get request', (async () =&gt; {
    fakeParametresService.getBaseUrl.and.returnValue(Promise.resolve({valeur: 'http://host:port'}));
  
    testedService.get&lt;any&gt;('/endpoint').then((response: any) =&gt; {
      expect(response.key).toBe('value');
    });
  
    await http.expectOne('http://host:port/endpoint').flush({key: 'value'});
    http.verify();    
  }));
  </code></pre>
  
  <p><strong>tested.service.ts</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>async get&lt;T&gt;(endpoint: string): Promise&lt;T&gt; {
    const baseUrl = await this.parametresService.getBaseUrl();
    return this.http.get&lt;T&gt;(`${baseUrl.valeur}${endpoint}`).toPromise();
  }
  </code></pre>
  
  <p>It seems that a http request nested within a promise cannot be mocked that way. But maybe it's a misunderstanding from me.</p>