How to write jasmine unit testing for opening modal as child component from parent using angular

open(content: any): void {
    const modalRef = this.modalService.open(MetricsModalComponent, { backdrop: 'static' });
    modalRef.componentInstance.datasourceModalData = content;
    modalRef.result.then((result) => {
      this.closeResult = `Closed with: ${result}`;
    }, (reason) => {
      this.closeResult = `Dismissed ${this.getDismissReason(reason)}`;
    });
  }