vendredi 8 février 2019

How to test is all subscription unsubscribed in Angular?

Basically, I want to check if there any alive subscriptions after the call of ngOnDestroy. Right now the code collects all subscriptions in the component's property-array and unsubscribes on ngOnDestroy. I could easily forget to add a newly created subscription to this array. Want to write a test that will help me eliminate such a situation.

Aucun commentaire:

Enregistrer un commentaire