-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Angular fails to instantiate module ngLocale in tests after upgrade to 1.3.12 #10967
Comments
Also having the same issue. |
+1 Also seeing the same... |
+1 |
1 similar comment
+1 |
+1 here |
@petebacondarwin would like to revert the commit that caused this regression until we have a better solution. WDYT? |
Let's see if we can't fix this but revert before the next release if no joy |
This seems to be the same issue that @jeffbcross mentioned for an internal test that failed for him. The fix is easy (initialize the variable to an empty array instead of undefined), but I would like to understand first why this happens and see if I can add a test to protect against this. Taking a deeper look. |
Thanks @shahata ! |
If anyone can post a reproduce it will be very helpful... |
OK, the reason for this as I suspected before is that someone is creating an injector before the first |
@shahata I think we should add a test to ng-mock to be sure that we do not break this in the future |
Thanks for getting on this so quickly. In our case, our source was https://github.com/cabrel/angular-lodash/blob/master/angular-lodash.js which was causing the issue. |
Test added. Though I'm not proud of it :) |
This caused an exception for people who created an injector before the tests actually began to run. Since the array was initialized only in beforeEach, anyone accessing it before that would throw. This is solved easily but initializing the array immediately. Closes #10967
In our CI the tests failed, I tried to reproduce locally and could not until I removed our bower libs and reinstalled. (we were asking for ~1.3).
I played with bower.json angular versions and found that 1.3.11 works and 1.3.12 fails.
the code that breaks our app is found in commit 6ec5946
line 2138 in angular-mocks.js
this occurs in angular-mocks therefore relevant only in testing environment
Reproducable: always
Browsers : Chrome 40, Phantom JS
Operating system: OSX 10.10, Ubuntu 14, Fedora 20
The text was updated successfully, but these errors were encountered: