]> source.dussan.org Git - jquery.git/commitdiff
Check animation is close instead of exact, closes gh-823.
authorMike Sherov <mike.sherov@gmail.com>
Tue, 12 Jun 2012 01:17:07 +0000 (21:17 -0400)
committerDave Methvin <dave.methvin@gmail.com>
Tue, 12 Jun 2012 01:24:19 +0000 (21:24 -0400)
test/unit/effects.js

index 729ba29bc2e38132a2ab465faf0fd383cea09e5d..780c5f4cf2f8b38ae886d3483e569c29bef3acc2 100644 (file)
@@ -1649,7 +1649,8 @@ asyncTest( "animate does not change start value for non-px animation (#7109)", 1
                        computed.push( parseFloat( child.css( "width" ) ) );
                }
        }).queue( function( next ) {
-               equal( computed[0], actual, "Starting width was unchanged" );
+               var ratio = computed[ 0 ] / actual;
+               ok( ratio > .9 && ratio < 1.1 , "Starting width was close enough" );
                next();
                start();
        });