summaryrefslogtreecommitdiff
path: root/tests/qunit/suites/resources/jquery/jquery.color.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qunit/suites/resources/jquery/jquery.color.test.js')
-rw-r--r--tests/qunit/suites/resources/jquery/jquery.color.test.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/qunit/suites/resources/jquery/jquery.color.test.js b/tests/qunit/suites/resources/jquery/jquery.color.test.js
new file mode 100644
index 00000000..c8e8ac70
--- /dev/null
+++ b/tests/qunit/suites/resources/jquery/jquery.color.test.js
@@ -0,0 +1,18 @@
+( function ( $ ) {
+ QUnit.module( 'jquery.color', QUnit.newMwEnvironment( {
+ setup: function () {
+ this.clock = this.sandbox.useFakeTimers();
+ }
+ } ) );
+
+ QUnit.test( 'animate', 1, function ( assert ) {
+ var $canvas = $( '<div>' ).css( 'background-color', '#fff' );
+
+ $canvas.animate( { backgroundColor: '#000' }, 10 ).promise().then( function () {
+ var endColors = $.colorUtil.getRGB( $canvas.css( 'background-color' ) );
+ assert.deepEqual( endColors, [0, 0, 0], 'end state' );
+ } );
+
+ this.clock.tick( 20 );
+ } );
+}( jQuery ) );