aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2015-04-22 15:50:43 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2015-04-24 15:13:07 +0200
commit8b89f8c59bacb1261639c909ee60fe3b856b36e4 (patch)
tree256b0094d8f131ba6cce29e31f2b6e54f4441fbc /tests
parent897a238332110c5c1a58ee9a0db5bf4e54fc3059 (diff)
downloadjquery-ui-8b89f8c59bacb1261639c909ee60fe3b856b36e4.tar.gz
jquery-ui-8b89f8c59bacb1261639c909ee60fe3b856b36e4.zip
Effect: Make .transfer() callback optional
Adds two tests to at least check that no exception is thrown. Fixes #12223 Closes gh-1545
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/effects/core.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/unit/effects/core.js b/tests/unit/effects/core.js
index 76fcaa062..db83ca093 100644
--- a/tests/unit/effects/core.js
+++ b/tests/unit/effects/core.js
@@ -258,6 +258,32 @@ test( "createPlaceholder: preserves layout affecting properties", function() {
deepEqual( before.outerHeight, placeholder.outerHeight( true ), "height preserved" );
});
+module( "transfer" );
+
+asyncTest( "transfer() without callback", function() {
+ expect( 0 );
+
+ // Verify that the effect works without a callback
+ $( "#elem" ).transfer( {
+ to: ".animateClass",
+ duration: 1
+ } );
+ setTimeout( function() {
+ start();
+ }, 25 );
+} );
+
+asyncTest( "transfer() with callback", function() {
+ expect( 1 );
+ $( "#elem" ).transfer( {
+ to: ".animateClass",
+ duration: 1
+ }, function() {
+ ok( true, "callback invoked" );
+ start();
+ } );
+} );
+
$.each( $.effects.effect, function( effect ) {
module( "effects." + effect );