aboutsummaryrefslogtreecommitdiffstats
path: root/test/ScopeSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2010-04-15 14:17:33 -0700
committerMisko Hevery2010-04-15 14:17:33 -0700
commit70e401ef100614295fc808e32f0142f07c315461 (patch)
tree7d31580fb512dd535465e4d42afb0252b0cf0071 /test/ScopeSpec.js
parentcd03fe92a5dbd2aba516b64fc8067c5fba1e4a81 (diff)
downloadangular.js-70e401ef100614295fc808e32f0142f07c315461.tar.bz2
added $route service
Diffstat (limited to 'test/ScopeSpec.js')
-rw-r--r--test/ScopeSpec.js10
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(){