Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 07084e1

Browse files
committed
test(injector): add missing test for #5577
Add a missing test for fix that was merged via #5577
1 parent 186a591 commit 07084e1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/auto/injectorSpec.js

+11
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,17 @@ describe('injector', function() {
7474
});
7575

7676

77+
it('should not corrupt the cache when an object fails to get instantiated', function() {
78+
expect(function() {
79+
injector.get('idontexist');
80+
}).toThrowMinErr("$injector", "unpr", "Unknown provider: idontexistProvider <- idontexist");
81+
82+
expect(function() {
83+
injector.get('idontexist');
84+
}).toThrowMinErr("$injector", "unpr", "Unknown provider: idontexistProvider <- idontexist");
85+
});
86+
87+
7788
it('should provide path to the missing provider', function() {
7889
providers('a', function(idontexist) {return 1;});
7990
providers('b', function(a) {return 2;});

0 commit comments

Comments
 (0)