title: Writing a unit test for ng-bootstrap modal (NgbModal) [Angular 6]
body: <p>I am having some trouble writing unit tests for a confirmation modal I have in my app.  Here is the piece of code I would like to test:</p>
  
  <pre><code>  confirmModal(prompt = 'Are you sure?', title = 'Confirm'): Observable&lt;boolean&gt; {
      const modal = this.ngbModal.open(
        ConfirmModalComponent, { backdrop: 'static' });
  
      modal.componentInstance.prompt = prompt;
      modal.componentInstance.title = title;
  
      return from(modal.result).pipe(
        catchError(error =&gt; {
          console.warn(error);
          return of(undefined);
        })
      );
    }
  </code></pre>
  
  <p>Any suggestions or examples?</p>