-
Notifications
You must be signed in to change notification settings - Fork 27.4k
angular.mock.$ExceptionHandlerProvider Provide mode logAndRethrow
#10540
Comments
You can easily achieve this via a decorator: http://plnkr.co/edit/OORm4yDYh2Gx1QoEvQt8 |
Actually, I think this would be good to have. It's ngMock so code size doesn't really matter, and there are a number of places where it's useful in core tests and worked around really awkwardly |
Oh right! I didn't notice that it was angular-mocks. Fine by me. This is an easy first PR if anyone is interested. Just add a new option to the |
I'll take a shot at it :) On Mon Dec 22 2014 at 4:54:39 AM Pete Bacon Darwin notifications@github.com
|
@DavidSouther - Great! Please make sure that you have signed the CLA, associated it with your Github username and that your commit messages match our requirements. Get in touch if you need any help. |
Uh... none of these |
The |
For a larger conversation, does it make sense to combine |
https://github.com/angular/angular.js/blob/master/src/ngMock/angular-mocks.js#L253
Currently, test exceptions can either log or rethrow. There are cases where the
throw
behavior is expected by the implementation, but it would also be nice to have a log available. In these situations, alogAndThrow
behavior would ease having two different code flows.The text was updated successfully, but these errors were encountered: