diff options
author | louisremi <louisremi@louisremi-laptop.(none)> | 2011-05-09 17:46:00 +0200 |
---|---|---|
committer | louisremi <louisremi@louisremi-laptop.(none)> | 2011-05-09 17:46:00 +0200 |
commit | f34a90b3f7a5d54beb267ce08295cb1e64c3a2af (patch) | |
tree | 8d50dfbc989e6e6f8695848a8551b309115a819e /test | |
parent | 076c347605c752821dfb6457044df4ba87b601c1 (diff) | |
download | jquery-f34a90b3f7a5d54beb267ce08295cb1e64c3a2af.tar.gz jquery-f34a90b3f7a5d54beb267ce08295cb1e64c3a2af.zip |
oops unit test
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/effects.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/unit/effects.js b/test/unit/effects.js index d05182173..f015fc91a 100644 --- a/test/unit/effects.js +++ b/test/unit/effects.js @@ -993,3 +993,20 @@ test("animate unit-less properties (#4966)", 2, function() { start(); }); }); + +test("callbacks should fire in correct order (#9100)", function() { + stop(); + var a = 1, + cb = 0, + $lis = jQuery("<p data-operation='*2'></p><p data-operation='^2'></p>").appendTo("#qunit-fixture") + // The test will always pass if no properties are animated or if the duration is 0 + .animate({fontSize: 12}, 13, function() { + console.log(jQuery(this).data("operation")) + a *= jQuery(this).data("operation") === "*2" ? 2 : a; + cb++; + if ( cb === 2 ) { + equal( a, 4, "test value has been *2 and _then_ ^2"); + start(); + } + }); +});
\ No newline at end of file |