aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorOleg <markelog@gmail.com>2013-08-08 04:11:42 +0400
committerRichard Gibson <richard.gibson@gmail.com>2013-08-08 09:45:28 -0400
commit34cc46579236ad1c9cbff7afbf4b4e25ae568ece (patch)
tree3cb654ce8856fe3aa9b0a5e5fcf8ecd637512347 /test
parent1e9d43c0bedabc8a23573cfed50ef56cbba38b57 (diff)
downloadjquery-34cc46579236ad1c9cbff7afbf4b4e25ae568ece.tar.gz
jquery-34cc46579236ad1c9cbff7afbf4b4e25ae568ece.zip
Improve test stability for #13855 ticket. Close gh-1328.
Diffstat (limited to 'test')
-rw-r--r--test/unit/effects.js19
1 files changed, 8 insertions, 11 deletions
diff --git a/test/unit/effects.js b/test/unit/effects.js
index 7fc8e7336..113390e6f 100644
--- a/test/unit/effects.js
+++ b/test/unit/effects.js
@@ -1445,16 +1445,13 @@ test("Do not append px to 'fill-opacity' #9548", 1, function() {
});
});
-test("line-height animates correctly (#13855)", function() {
- expect( 12 );
- stop();
-
+asyncTest("line-height animates correctly (#13855)", 12, function() {
var
animated = jQuery(
- "<p style='line-height: 4;'>unitless</p>" +
- "<p style='line-height: 50px;'>px</p>" +
- "<p style='line-height: 420%;'>percent</p>" +
- "<p style='line-height: 2.5em;'>em</p>"
+ "<p style='line-height: 5000;'>unitless</p>" +
+ "<p style='line-height: 5000px;'>px</p>" +
+ "<p style='line-height: 5000%;'>percent</p>" +
+ "<p style='line-height: 5000em;'>em</p>"
).appendTo("#qunit-fixture"),
initialHeight = jQuery.map( animated, function( el ) {
return jQuery( el ).height();
@@ -1466,8 +1463,8 @@ test("line-height animates correctly (#13855)", function() {
var label = jQuery.text( this ),
initial = initialHeight[ i ],
height = jQuery( this ).height();
- ok( height < initial, "hide " + label + ": upper bound" );
- ok( height > initial / 2, "hide " + label + ": lower bound" );
+ ok( height < initial, "hide " + label + ": upper bound; height:" + height + "; intitial: " + initial );
+ ok( height > initial / 2, "hide " + label + ": lower bound; height:" + height + "; intitial/2: " + initial / 2 );
});
animated.stop( true, true ).hide().animate( { "line-height": "show" }, 1500 );
setTimeout(function() {
@@ -1475,7 +1472,7 @@ test("line-height animates correctly (#13855)", function() {
var label = jQuery.text( this ),
initial = initialHeight[ i ],
height = jQuery( this ).height();
- ok( height < initial / 2, "show " + label + ": upper bound" );
+ ok( height < initial / 2, "show " + label + ": upper bound; height:" + height + "; intitial/2: " + initial / 2 );
});
animated.stop( true, true );
start();