diff options
Diffstat (limited to 'test/ScopeSpec.js')
| -rw-r--r-- | test/ScopeSpec.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ScopeSpec.js b/test/ScopeSpec.js index 0665968b..23638b27 100644 --- a/test/ScopeSpec.js +++ b/test/ScopeSpec.js @@ -82,6 +82,16 @@ describe('scope/model', function(){ expect(element.hasClass('ng-exception')).toBeTruthy(); }); + it('should report error on $excetionHandler', function(){ + var element = jqLite('<div></div>'); + var scope = createScope(); + scope.$exceptionHandler = function(e){ + this.error = e; + }; + scope.$tryEval('throw "myError"'); + expect(scope.error).toEqual("myError"); + }); + // $onEval it("should eval using priority", function(){ |
