jeudi 7 décembre 2017

Angular 2 Testing PrimeNG ConfirmationDialog

I'm writing jasmine unit test for following code:

this.confirmationService.confirm({
  message: 'Are you sure that you want to delete?',
  accept: () => {
   //some code to test
  }
});

How I can fake clicking of Yes in the dialog, to test code inside accept() function?

Aucun commentaire:

Enregistrer un commentaire