From 9214c37bbaa79aa99c85c8043a870c8cec3d7b0f Mon Sep 17 00:00:00 2001 From: Oleg Date: Thu, 8 Aug 2013 04:11:42 +0400 Subject: [PATCH] Improve test stability for #13855 ticket. Close gh-1328. --- test/unit/effects.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) 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(); -- 2.39.5