mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-24 03:55:49 +08:00
test(injector): add missing test for #5577
Add a missing test for fix that was merged via #5577
This commit is contained in:
@@ -74,6 +74,17 @@ describe('injector', function() {
|
||||
});
|
||||
|
||||
|
||||
it('should not corrupt the cache when an object fails to get instantiated', function() {
|
||||
expect(function() {
|
||||
injector.get('idontexist');
|
||||
}).toThrowMinErr("$injector", "unpr", "Unknown provider: idontexistProvider <- idontexist");
|
||||
|
||||
expect(function() {
|
||||
injector.get('idontexist');
|
||||
}).toThrowMinErr("$injector", "unpr", "Unknown provider: idontexistProvider <- idontexist");
|
||||
});
|
||||
|
||||
|
||||
it('should provide path to the missing provider', function() {
|
||||
providers('a', function(idontexist) {return 1;});
|
||||
providers('b', function(a) {return 2;});
|
||||
|
||||
Reference in New Issue
Block a user