Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Vijeinath committed Nov 16, 2023
1 parent 783ce0e commit a3197fb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class ConfirmationDialogTestHostComponent implements OnInit {
buttonTextCancel: 'Cancel'
}
}).afterClosed().subscribe((payload: ConfirmationDialogValueDeletionPayload) => {
if (payload.confirmed) {
if (payload?.confirmed) {
this.confirmationDialogResponse = 'Action was confirmed!';
} else {
this.confirmationDialogResponse = 'Action was cancelled';
Expand Down Expand Up @@ -101,7 +101,7 @@ describe('ConfirmationDialogComponent', () => {
const dialogs = await rootLoader.getAllHarnesses(MatDialogHarness);
await Promise.all(dialogs.map(async d => await d.close()));

// Angular won't call this for us so we need to do it ourselves to avoid leaks.
// Angular won't call this for us, so we need to do it ourselves to avoid leaks.
overlayContainer.ngOnDestroy();
});

Expand Down

0 comments on commit a3197fb

Please sign in to comment.