title: ngx-bootstrap modal does not hide during test
body: <p>In my Angular application, I'm writing some integration tests where I have an <a href="https://valor-software.com/ngx-bootstrap/#/modals" rel="nofollow noreferrer">ngx-bootstrap modal</a></p>
  
  <p>In my integration tests, I'm testing a Component which contains a button that pops up a modal. Inside a modal, there is a "Save" button which is clicked during the tests.</p>
  
  <p>Inside the Modal Component, the button triggers a method on click:
   <code>(click)=onSave()</code> and this is how the Modal Component looks like:</p>
  
  <pre><code>constructor(
    protected bsModalRef: BsModalRef,
  ) {}
  
  
  onSave() {
    // do some stuff (NOTE: this part is actually executed during the test)
    this.bsModalRef.hide();
  }
  </code></pre>
  
  <p>Everything works fine, except that the modal won't disappear. However the <code>onSave()</code> method is correctly executed.</p>
  
  <p>That is very strange, because if I manually click on the button after the test has finished to run, it correctly hides the modal</p>
  
  <p>But during the test, despite the button correctly receives the click and triggers the execution of the <code>onSave()</code> method, the modal does not disapper.</p>
  
  <p>Note: there are no spies involved here and, since it's an integration test, I would prefer to not mock the <code>hide()</code> method but to actually make it work during the test and then assert that the modal has correctly disappeared together with the other side-effects of my custom <code>onSave()</code> method.</p>