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

Commit c77b607

Browse files
committed
chore(mocks): remove $$animateReflow from triggerReflow()
This service was removed when 1.4.0 was released, but the mock code still stubs it.
1 parent ec22d22 commit c77b607

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/ngMock/angular-mocks.js

-15
Original file line numberDiff line numberDiff line change
@@ -755,15 +755,6 @@ angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
755755

756756
.config(['$provide', function($provide) {
757757

758-
var reflowQueue = [];
759-
$provide.value('$$animateReflow', function(fn) {
760-
var index = reflowQueue.length;
761-
reflowQueue.push(fn);
762-
return function cancel() {
763-
reflowQueue.splice(index, 1);
764-
};
765-
});
766-
767758
$provide.decorator('$animate', ['$delegate', '$timeout', '$browser', '$$rAF',
768759
function($delegate, $timeout, $browser, $$rAF) {
769760
var animate = {
@@ -779,12 +770,6 @@ angular.mock.animate = angular.module('ngAnimateMock', ['ng'])
779770
triggerCallbacks: function() {
780771
this.triggerCallbackEvents();
781772
this.triggerCallbackPromise();
782-
},
783-
triggerReflow: function() {
784-
angular.forEach(reflowQueue, function(fn) {
785-
fn();
786-
});
787-
reflowQueue = [];
788773
}
789774
};
790775

test/ngRoute/directive/ngViewSpec.js

-2
Original file line numberDiff line numberDiff line change
@@ -777,8 +777,6 @@ describe('ngView animations', function() {
777777
expect($animate.queue.shift().event).toBe('addClass');
778778
expect($animate.queue.shift().event).toBe('removeClass');
779779

780-
$animate.triggerReflow();
781-
782780
expect(item.hasClass('classy')).toBe(false);
783781
expect(item.hasClass('boring')).toBe(true);
784782

0 commit comments

Comments
 (0)