aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2010-09-17 14:30:30 -0400
committerJohn Resig <jeresig@gmail.com>2010-09-17 14:30:30 -0400
commit192bab8ed6e8ad2b4c5de0c4660c80b6ecddfd33 (patch)
tree26ae9d66aad3dffecc6d5a4c05b6bd062eceffd4 /test
parentd1f3dc9a04225b327b6fd6deb9d3913918054a9f (diff)
downloadjquery-192bab8ed6e8ad2b4c5de0c4660c80b6ecddfd33.tar.gz
jquery-192bab8ed6e8ad2b4c5de0c4660c80b6ecddfd33.zip
jQuery.css() returns a string value - handle this properly in the animation code.
Diffstat (limited to 'test')
-rw-r--r--test/unit/effects.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/unit/effects.js b/test/unit/effects.js
index 32ce583b3..5ac471157 100644
--- a/test/unit/effects.js
+++ b/test/unit/effects.js
@@ -240,11 +240,11 @@ test("stop()", function() {
$foo.animate({ width:'show' }, 1000);
setTimeout(function(){
var nw = $foo.width();
- ok( nw != w, "An animation occurred " + nw + "px " + w + "px");
+ notEqual( nw, w, "An animation occurred " + nw + "px " + w + "px");
$foo.stop();
nw = $foo.width();
- ok( nw != w, "Stop didn't reset the animation " + nw + "px " + w + "px");
+ notEqual( nw, w, "Stop didn't reset the animation " + nw + "px " + w + "px");
setTimeout(function(){
equals( nw, $foo.width(), "The animation didn't continue" );
start();
@@ -266,13 +266,12 @@ test("stop() - several in queue", function() {
setTimeout(function(){
equals( $foo.queue().length, 3, "All 3 still in the queue" );
var nw = $foo.width();
- ok( nw != w, "An animation occurred " + nw + "px " + w + "px");
+ notEqual( nw, w, "An animation occurred " + nw + "px " + w + "px");
$foo.stop();
nw = $foo.width();
- ok( nw != w, "Stop didn't reset the animation " + nw + "px " + w + "px");
- // Disabled, being flaky
- //equals( $foo.queue().length, 1, "The next animation continued" );
+ notEqual( nw, w, "Stop didn't reset the animation " + nw + "px " + w + "px");
+
$foo.stop(true);
start();
}, 100);
@@ -517,7 +516,7 @@ jQuery.each( {
if ( t_h == "show" ) {
var old_h = jQuery.css(this, "height");
jQuery(this).append("<br/>Some more text<br/>and some more...");
- notEqual(jQuery.css(this, "height"), old_h, "Make sure height is auto.");
+ notEqual(jQuery.css(this, "height") + "px", old_h, "Make sure height is auto.");
}
start();