I need to mock a NgbModal to do some unit tests in angular, but I have no idea how to do this. This is my function:
openModal(deviceID: string, productID: string){
const modalRef = this.modalService.open(ProductModal)
modalRef.componentInstance.content = {
deviceId: deviceID,
productId: productID
}
modalRef.componentInstance.toEmit.subscribe(($e) => {
if ($e === true) this.reloadList();
});
}
What am I supposed to do?