-
Notifications
You must be signed in to change notification settings - Fork 27.5k
ngMock contains unannotated functions #13542
Comments
Probably happens because ngMock isn't usually minified, because it should only run in tests, where minification isn't really needed. But we should probably fix it anyway. |
Indeed I don't think it is intended to be minified. (In fact we are not producing a |
@gkalpak I just modified our Gulp file to prevent minification of |
OK, from a quick search, this has been brought up #3534 and #4448 before. The last comment from @IgorMinar sums it up nicely, I think:
So, @szimek, did you just complain ? 😄 |
@gkalpak I just wanted to explain why people minify it 😄 I found a workaround for it, so it's fine for me as it is, but I suspect there are a lot more people who just add |
@gkalpak It is rare scenario but it exists, I've experienced problems after 1.5.0-beta.2. I test here that class detection will fail in transpiled and minified code on some condition, while it will pass on another condition. Without mgMock being fixed, I have to revise the way the specs are being bundled. |
It is not common, but some workflows result in `angular-mocks` being minified. Fixes angular#13542
@bisubus, @szimek, could you try out this angular-mocks.js and see if it works for you ? |
@gkalpak, we had the same issue as OP, and I have just tried your build and it is working for us 👍 Thanks! It would be nice to see this in 1.5.1 |
Thx, @messo, for the feedback. If it doesn't make it into |
ngMock contains unannotated functions, i.e.
angular.js/src/ngMock/angular-mocks.js
Line 2527 in d67e999
angular.js/src/ngMock/angular-mocks.js
Line 2652 in d67e999
This prevents
angular-mocks.js
from being minified.The problem was conditional (
angular.mock.module({ mockedService: ... })
syntax was incompatible with minification before this commit), now it throwsunconditionally.
The text was updated successfully, but these errors were encountered: