From: Oleg Date: Thu, 8 Aug 2013 00:11:42 +0000 (+0400) Subject: Improve test stability for #13855 ticket. Close gh-1328. X-Git-Tag: 2.1.0-beta1~96 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9214c37bbaa79aa99c85c8043a870c8cec3d7b0f;p=jquery.git Improve test stability for #13855 ticket. Close gh-1328. --- diff --git a/test/unit/effects.js b/test/unit/effects.js index e740191ce..523e19b12 100644 --- a/test/unit/effects.js +++ b/test/unit/effects.js @@ -1411,16 +1411,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( - "

unitless

" + - "

px

" + - "

percent

" + - "

em

" + "

unitless

" + + "

px

" + + "

percent

" + + "

em

" ).appendTo("#qunit-fixture"), initialHeight = jQuery.map( animated, function( el ) { return jQuery( el ).height(); @@ -1432,8 +1429,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() { @@ -1441,7 +1438,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();