angularjsでディレクティブの$destroyイベントを単体テストする方法は?
ディレクティブにコードがあります:
scope.$on('$destroy', function () {
//clean something
});
私のテストコード:
it('on destroy',function(){
scope.$destroy();
scope.$digest();
//expect everything done?
});
なにか提案を!