-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Including angular-mocks breaks ngAnimate animations #5917
Comments
This is because when angular-mocks is loaded it will mock out a task queue that is being used by ngAnimation. This change was done in 1.2.9 because we didn't realize that one would want to use angular-mocks.js in non-unit-testing mode. This was a wrong assumption. We need to correct it. @matsko can we just modify the mock queue to not be loaded by default but instead require unit tests that need it to explicitly load this module? |
Yes we need to properly figure this out. I'm actually thinking of redoing the |
Awesome 👍 |
We ran into some scheduling issues with 1.2.10 so this will be in 1.2.11. It should be reviewed and merged in at the start of the week so you can use the snapshot version once that's in. Sorry for the delay. |
@matsko what's the status on this one? we need to get this in asap. |
I was working on an app with the latest 1.2.9 release and all was well until I started to use
ngMockE2E
's$httpBackend
to do some backend-less development. Once angular-mocks.js was included on the page my animations would no longer work. What's interesting is removingngMockE2E
as a dependency for my app is not enough to get animations working again, angular-mocks.js must be removed entirely. Here's some fiddles to help illustrate the issue:angular-mocks not included (works as expected):
http://jsfiddle.net/8y3Ey/
angular-mocks included (animations appear to start but halt on enter):
http://jsfiddle.net/q8SQg/
Current workarounds are to either remove animation classes from elements (don't use animations) or to refrain from including angular-mocks.js (don't use ngMock/ngMockE2E). There's been quite a few releases since I last used angular mocks so it's possible that I'm just doing something incorrectly.
The text was updated successfully, but these errors were encountered: