aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/widget/animation.js
diff options
context:
space:
mode:
authorAlexander Schmitz <arschmitz@gmail.com>2015-08-24 09:32:13 -0400
committerAlexander Schmitz <arschmitz@gmail.com>2015-09-11 08:36:41 -0400
commite021e4d6e22dff80ec3a8ba84266508d34944a35 (patch)
treebdc141ce43ac9e0ac1889fea01b736edf0279eb2 /tests/unit/widget/animation.js
parent14b3b607e53aa7c6a186e23be554911d5a56d1f7 (diff)
downloadjquery-ui-e021e4d6e22dff80ec3a8ba84266508d34944a35.tar.gz
jquery-ui-e021e4d6e22dff80ec3a8ba84266508d34944a35.zip
Widget: Style updates
Ref #14246
Diffstat (limited to 'tests/unit/widget/animation.js')
-rw-r--r--tests/unit/widget/animation.js144
1 files changed, 72 insertions, 72 deletions
diff --git a/tests/unit/widget/animation.js b/tests/unit/widget/animation.js
index 4e9d93ccf..9f9f92710 100644
--- a/tests/unit/widget/animation.js
+++ b/tests/unit/widget/animation.js
@@ -3,7 +3,7 @@ define( [
"ui/widget"
], function( $ ) {
-module( "widget animation", (function() {
+module( "widget animation", ( function() {
var show = $.fn.show,
fadeIn = $.fn.fadeIn,
slideDown = $.fn.slideDown;
@@ -16,7 +16,7 @@ module( "widget animation", (function() {
show: function( fn ) {
this._show( this.element, this.options.show, fn );
}
- });
+ } );
$.effects = { effect: { testEffect: $.noop } };
},
teardown: function() {
@@ -27,7 +27,7 @@ module( "widget animation", (function() {
$.fn.slideDown = slideDown;
}
};
-}()));
+}() ) );
asyncTest( "show: null", function() {
expect( 4 );
@@ -41,223 +41,223 @@ asyncTest( "show: null", function() {
element
.delay( 50 )
- .queue(function( next ) {
+ .queue( function( next ) {
ok( !hasRun, "queue before show" );
next();
- })
+ } )
.testWidget( "show", function() {
hasRun = true;
- })
- .queue(function( next ) {
+ } )
+ .queue( function( next ) {
ok( hasRun, "queue after show" );
start();
next();
- });
-});
+ } );
+} );
asyncTest( "show: true", function() {
expect( 4 );
- var element = $( "#widget" ).testWidget({
+ var element = $( "#widget" ).testWidget( {
show: true
- }),
+ } ),
hasRun = false;
$.fn.fadeIn = function( duration, easing, complete ) {
- return this.queue(function( next ) {
+ return this.queue( function( next ) {
strictEqual( duration, undefined, "duration" );
strictEqual( easing, undefined, "easing" );
complete();
next();
- });
+ } );
};
element
.delay( 50 )
- .queue(function( next ) {
+ .queue( function( next ) {
ok( !hasRun, "queue before show" );
next();
- })
+ } )
.testWidget( "show", function() {
hasRun = true;
- })
- .queue(function( next ) {
+ } )
+ .queue( function( next ) {
ok( hasRun, "queue after show" );
start();
next();
- });
-});
+ } );
+} );
asyncTest( "show: number", function() {
expect( 4 );
- var element = $( "#widget" ).testWidget({
+ var element = $( "#widget" ).testWidget( {
show: 123
- }),
+ } ),
hasRun = false;
$.fn.fadeIn = function( duration, easing, complete ) {
- return this.queue(function( next ) {
+ return this.queue( function( next ) {
strictEqual( duration, 123, "duration" );
strictEqual( easing, undefined, "easing" );
complete();
next();
- });
+ } );
};
element
.delay( 50 )
- .queue(function( next ) {
+ .queue( function( next ) {
ok( !hasRun, "queue before show" );
next();
- })
+ } )
.testWidget( "show", function() {
hasRun = true;
- })
- .queue(function( next ) {
+ } )
+ .queue( function( next ) {
ok( hasRun, "queue after show" );
start();
next();
- });
-});
+ } );
+} );
asyncTest( "show: core animation", function() {
expect( 4 );
- var element = $( "#widget" ).testWidget({
+ var element = $( "#widget" ).testWidget( {
show: "slideDown"
- }),
+ } ),
hasRun = false;
$.fn.slideDown = function( duration, easing, complete ) {
- return this.queue(function( next ) {
+ return this.queue( function( next ) {
strictEqual( duration, undefined, "duration" );
strictEqual( easing, undefined, "easing" );
complete();
next();
- });
+ } );
};
element
.delay( 50 )
- .queue(function( next ) {
+ .queue( function( next ) {
ok( !hasRun, "queue before show" );
next();
- })
+ } )
.testWidget( "show", function() {
hasRun = true;
- })
- .queue(function( next ) {
+ } )
+ .queue( function( next ) {
ok( hasRun, "queue after show" );
start();
next();
- });
-});
+ } );
+} );
asyncTest( "show: effect", function() {
expect( 5 );
- var element = $( "#widget" ).testWidget({
+ var element = $( "#widget" ).testWidget( {
show: "testEffect"
- }),
+ } ),
hasRun = false;
$.fn.show = function( options ) {
- return this.queue(function( next ) {
+ return this.queue( function( next ) {
equal( options.effect, "testEffect", "effect" );
- ok( !("duration" in options), "duration" );
- ok( !("easing" in options), "easing" );
+ ok( !( "duration" in options ), "duration" );
+ ok( !( "easing" in options ), "easing" );
options.complete();
next();
- });
+ } );
};
element
.delay( 50 )
- .queue(function( next ) {
+ .queue( function( next ) {
ok( !hasRun, "queue before show" );
next();
- })
+ } )
.testWidget( "show", function() {
hasRun = true;
- })
- .queue(function( next ) {
+ } )
+ .queue( function( next ) {
ok( hasRun, "queue after show" );
start();
next();
- });
-});
+ } );
+} );
asyncTest( "show: object(core animation)", function() {
expect( 4 );
- var element = $( "#widget" ).testWidget({
+ var element = $( "#widget" ).testWidget( {
show: {
effect: "slideDown",
duration: 123,
easing: "testEasing"
}
- }),
+ } ),
hasRun = false;
$.fn.slideDown = function( duration, easing, complete ) {
- return this.queue(function( next ) {
+ return this.queue( function( next ) {
equal( duration, 123, "duration" );
equal( easing, "testEasing", "easing" );
complete();
next();
- });
+ } );
};
element
.delay( 50 )
- .queue(function( next ) {
+ .queue( function( next ) {
ok( !hasRun, "queue before show" );
next();
- })
+ } )
.testWidget( "show", function() {
hasRun = true;
- })
- .queue(function( next ) {
+ } )
+ .queue( function( next ) {
ok( hasRun, "queue after show" );
start();
next();
- });
-});
+ } );
+} );
asyncTest( "show: object(effect)", function() {
expect( 3 );
- var element = $( "#widget" ).testWidget({
+ var element = $( "#widget" ).testWidget( {
show: {
effect: "testEffect",
duration: 123,
easing: "testEasing"
}
- }),
+ } ),
hasRun = false;
$.fn.show = function( options ) {
- return this.queue(function( next ) {
+ return this.queue( function( next ) {
deepEqual( options, {
effect: "testEffect",
duration: 123,
easing: "testEasing",
complete: options.complete
- });
+ } );
options.complete();
next();
- });
+ } );
};
element
.delay( 50 )
- .queue(function( next ) {
+ .queue( function( next ) {
ok( !hasRun, "queue before show" );
next();
- })
+ } )
.testWidget( "show", function() {
hasRun = true;
- })
- .queue(function( next ) {
+ } )
+ .queue( function( next ) {
ok( hasRun, "queue after show" );
start();
next();
- });
-});
+ } );
+} );
} );