diff options
Diffstat (limited to 'www/wiki/tests/qunit/suites/resources/jquery/jquery.color.test.js')
-rw-r--r-- | www/wiki/tests/qunit/suites/resources/jquery/jquery.color.test.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/www/wiki/tests/qunit/suites/resources/jquery/jquery.color.test.js b/www/wiki/tests/qunit/suites/resources/jquery/jquery.color.test.js new file mode 100644 index 00000000..ca6a512f --- /dev/null +++ b/www/wiki/tests/qunit/suites/resources/jquery/jquery.color.test.js @@ -0,0 +1,15 @@ +( function ( $ ) { + QUnit.module( 'jquery.color', QUnit.newMwEnvironment() ); + + QUnit.test( 'animate', function ( assert ) { + var done = assert.async(), + $canvas = $( '<div>' ).css( 'background-color', '#fff' ).appendTo( '#qunit-fixture' ); + + $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 ) ); |