Skip to content

Commit c08cf8e

Browse files
gnarfscottgonzalez
authored andcommitted
Unit Tests: adding unit test for #7356
1 parent 7550018 commit c08cf8e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/unit/effects/effects_core.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,24 @@ asyncTest( "animateClass works with colors", function() {
8080
}, 50);
8181
});
8282

83+
asyncTest( "animateClass works with children", function() {
84+
var test = $("div.animateClass"),
85+
h2 = test.find("h2");
86+
87+
expect(4);
88+
test.toggleClass("testChildren", { children: true, duration: 100, complete: function() {
89+
equal( h2.css("fontSize"), "20px", "Text size is final during complete");
90+
test.toggleClass("testChildren", 100, function() {
91+
equal( h2.css("fontSize"), "10px", "Text size revertted after class removed");
92+
start();
93+
});
94+
setTimeout(function() {
95+
equal( h2.css("fontSize"), "20px", "Text size unchanged with children: undefined" );
96+
}, 50);
97+
}});
98+
setTimeout(function() {
99+
notPresent( h2.css("fontSize"), ["10px","20px"], "Font size is neither endpoint when in middle.");
100+
}, 50);
101+
});
102+
83103
})(jQuery);

0 commit comments

Comments
 (0)