From 8ddee9bb25ade2bbe7d57db6353b29867606c184 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Mon, 26 Jul 2010 16:11:25 -0700 Subject: add $exceptionHandler service --- test/servicesSpec.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/servicesSpec.js b/test/servicesSpec.js index 031c48f0..91538703 100644 --- a/test/servicesSpec.js +++ b/test/servicesSpec.js @@ -66,6 +66,15 @@ describe("service", function(){ }); }); + describe("$exceptionHandler", function(){ + it('should log errors', function(){ + var error = ''; + $log.error = function(m) { error += m; }; + scope.$exceptionHandler('myError'); + expect(error).toEqual('myError'); + }); + }); + describe("$location", function(){ it("should inject $location", function(){ scope.$location.parse('http://host:123/p/a/t/h.html?query=value#path?key=value'); -- cgit v1.2.3