Merge "resources: Strip '$' and 'mw' from file closures"
[lhc/web/wiklou.git] / tests / qunit / suites / resources / jquery / jquery.color.test.js
index 839c5d5..d207260 100644 (file)
@@ -1,15 +1,15 @@
-( function ( $ ) {
+( function () {
        QUnit.module( 'jquery.color', QUnit.newMwEnvironment() );
 
-       QUnit.asyncTest( 'animate', 3, function ( assert ) {
-               var $canvas = $( '<div>' ).css( 'background-color', '#fff' );
+       QUnit.test( 'animate', function ( assert ) {
+               var done = assert.async(),
+                       $canvas = $( '<div>' ).css( 'background-color', '#fff' ).appendTo( '#qunit-fixture' );
 
-               $canvas.animate( { backgroundColor: '#000' }, 4 ).promise().then( function () {
-                       var endColors = $.colorUtil.getRGB( $canvas.css( 'background-color' ) );
-                       assert.strictEqual( endColors[0], 0 );
-                       assert.strictEqual( endColors[1], 0 );
-                       assert.strictEqual( endColors[2], 0 );
-                       QUnit.start();
-               } );
+               $canvas.animate( { 'background-color': '#000' }, 3 ).promise()
+                       .done( function () {
+                               var endColors = $.colorUtil.getRGB( $canvas.css( 'background-color' ) );
+                               assert.deepEqual( endColors, [ 0, 0, 0 ], 'end state' );
+                       } )
+                       .always( done );
        } );
-}( jQuery ) );
+}() );