Skip to content

Commit a89ff40

Browse files
committed
Unit Tests: Adding a unit test to make sure .stop( true, true ) clears the inline styles when using animateClass - Fixed #3928 - Class-Animation: Please add a clearInlineStyle-Option
1 parent 5f0a2f0 commit a89ff40

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/unit/effects/effects_core.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,19 @@ asyncTest( "animateClass works with children", function() {
123123
}});
124124
});
125125

126+
asyncTest( "animateClass clears style properties when stopped", function() {
127+
var test = $("div.animateClass"),
128+
style = test[0].style,
129+
orig = style.cssText;
130+
131+
expect( 2 );
132+
133+
test.addClass( "testChangeBackground", duration );
134+
notEqual( orig, style.cssText, "cssText is the not the same after starting animation" );
135+
136+
test.stop( true, true );
137+
equal( orig, style.cssText, "cssText is the same after stopping animation midway" );
138+
start();
139+
});
140+
126141
})(jQuery);

0 commit comments

Comments
 (0)