Clear pending timeouts when AppController is destroyed
Fix a flaky AppController test and potential causes of flakyness or runtime errors in other tests due to timeouts set up in directives or controllers firing after the associated scope is destroyed. Add a helper which sets a timeout that is cleared automatically when an associated scope is destroyed. In the AppController test this manifested itself with a timeout being called when `$document[0]` was not set.
Showing
Please register or sign in to comment