diff options
Diffstat (limited to 'test/auto')
| -rw-r--r-- | test/auto/injectorSpec.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/auto/injectorSpec.js b/test/auto/injectorSpec.js index b59a344f..4f70fb27 100644 --- a/test/auto/injectorSpec.js +++ b/test/auto/injectorSpec.js @@ -70,7 +70,7 @@ describe('injector', function() { it('should provide useful message if no provider', function() { expect(function() { injector.get('idontexist'); - }).toThrow("[NgErr1] Unknown provider: idontexistProvider <- idontexist"); + }).toThrow("[$injector:unpr] Unknown provider: idontexistProvider <- idontexist"); }); @@ -79,7 +79,7 @@ describe('injector', function() { providers('b', function(a) {return 2;}); expect(function() { injector.get('b'); - }).toThrow("[NgErr1] Unknown provider: idontexistProvider <- idontexist <- a <- b"); + }).toThrow("[$injector:unpr] Unknown provider: idontexistProvider <- idontexist <- a <- b"); }); @@ -127,10 +127,10 @@ describe('injector', function() { it('should fail with errors if not function or array', function() { expect(function() { injector.invoke({}); - }).toThrow("[NgErr45] Argument 'fn' is not a function, got Object"); + }).toThrow("[ng:areq] Argument 'fn' is not a function, got Object"); expect(function() { injector.invoke(['a', 123], {}); - }).toThrow("[NgErr45] Argument 'fn' is not a function, got number"); + }).toThrow("[ng:areq] Argument 'fn' is not a function, got number"); }); }); @@ -268,7 +268,7 @@ describe('injector', function() { it('should error on invalid module name', function() { expect(function() { createInjector(['IDontExist'], {}); - }).toThrow("[NgErr47] Module 'IDontExist' is not available! You either misspelled the module name or forgot to load it."); + }).toThrow("[$injector:nomod] Module 'IDontExist' is not available! You either misspelled the module name or forgot to load it."); }); @@ -552,7 +552,7 @@ describe('injector', function() { createInjector([ {} ], {}); - }).toThrow("[NgErr45] Argument 'module' is not a function, got Object"); + }).toThrow("[ng:areq] Argument 'module' is not a function, got Object"); }); @@ -569,7 +569,7 @@ describe('injector', function() { angular.module('TestModule', [], function(xyzzy) {}); expect(function() { createInjector(['TestModule']); - }).toThrow('[NgErr1] Unknown provider: xyzzy from TestModule'); + }).toThrow('[$injector:unpr] Unknown provider: xyzzy from TestModule'); }); @@ -577,7 +577,7 @@ describe('injector', function() { function myModule(xyzzy){} expect(function() { createInjector([myModule]); - }).toThrow('[NgErr1] Unknown provider: xyzzy from ' + myModule); + }).toThrow('[$injector:unpr] Unknown provider: xyzzy from ' + myModule); }); @@ -585,7 +585,7 @@ describe('injector', function() { function myModule(xyzzy){} expect(function() { createInjector([['xyzzy', myModule]]); - }).toThrow('[NgErr1] Unknown provider: xyzzy from ' + myModule); + }).toThrow('[$injector:unpr] Unknown provider: xyzzy from ' + myModule); }); @@ -595,7 +595,7 @@ describe('injector', function() { $provide.factory('service', function(service){}); return function(service) {} }]) - }).toThrow("[NgErr4] Circular dependency found: service"); + }).toThrow("[$injector:cdep] Circular dependency found: service"); }); @@ -606,7 +606,7 @@ describe('injector', function() { $provide.factory('b', function(a){}); return function(a) {} }]) - }).toThrow('[NgErr4] Circular dependency found: b <- a'); + }).toThrow('[$injector:cdep] Circular dependency found: b <- a'); }); }); }); @@ -696,7 +696,7 @@ describe('injector', function() { it('should throw usefull error on wrong argument type]', function() { expect(function() { $injector.invoke({}); - }).toThrow("[NgErr45] Argument 'fn' is not a function, got Object"); + }).toThrow("[ng:areq] Argument 'fn' is not a function, got Object"); }); }); @@ -783,7 +783,7 @@ describe('injector', function() { }]); expect(function() { $injector.get('nameProvider'); - }).toThrow("[NgErr1] Unknown provider: nameProviderProvider <- nameProvider"); + }).toThrow("[$injector:unpr] Unknown provider: nameProviderProvider <- nameProvider"); }); @@ -791,7 +791,7 @@ describe('injector', function() { var $injector = createInjector([]); expect(function() { $injector.get('$provide').value('a', 'b'); - }).toThrow("[NgErr1] Unknown provider: $provideProvider <- $provide"); + }).toThrow("[$injector:unpr] Unknown provider: $provideProvider <- $provide"); }); @@ -801,7 +801,7 @@ describe('injector', function() { createInjector([function($provide) { $provide.value('name', 'angular') }, instanceLookupInModule]); - }).toThrow('[NgErr1] Unknown provider: name from ' + String(instanceLookupInModule)); + }).toThrow('[$injector:unpr] Unknown provider: name from ' + String(instanceLookupInModule)); }); }); }); |
