aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/queue.js
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2012-11-08 10:05:10 -0500
committerRichard Gibson <richard.gibson@gmail.com>2012-11-08 10:10:43 -0500
commit517846aad247aa3677d156aa426f71b8dcacdcf7 (patch)
treec891caaeae3cda48613ac4abc541395013c51faa /test/unit/queue.js
parent877306738f931a711c41d907e69fc8930f985830 (diff)
downloadjquery-517846aad247aa3677d156aa426f71b8dcacdcf7.tar.gz
jquery-517846aad247aa3677d156aa426f71b8dcacdcf7.zip
No ticket: speedup test suite. Close gh-1020.
Diffstat (limited to 'test/unit/queue.js')
-rw-r--r--test/unit/queue.js19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/unit/queue.js b/test/unit/queue.js
index 0b17f6e1e..9cecad7a5 100644
--- a/test/unit/queue.js
+++ b/test/unit/queue.js
@@ -259,17 +259,16 @@ if ( jQuery.fn.stop ) {
expect( 3 );
stop();
- var foo = jQuery({}), run = 0;
-
- foo
+ var done = {};
+ jQuery({})
.queue( "alternate", function( next ) {
- run++;
+ done.alt1 = true;
ok( true, "This first function was dequeued" );
next();
})
.delay( 1000, "alternate" )
.queue( "alternate", function() {
- run++;
+ done.alt2 = true;
ok( true, "The function was dequeued immediately, the delay was stopped" );
})
.dequeue( "alternate" )
@@ -278,18 +277,20 @@ if ( jQuery.fn.stop ) {
.stop( "alternate", false, false )
// this test
- .delay( 1000 )
+ .delay( 1 )
.queue(function() {
- run++;
+ done.default1 = true;
ok( false, "This queue should never run" );
})
// stop( clearQueue ) should clear the queue
.stop( true, false );
- equal( run, 2, "Queue ran the proper functions" );
+ deepEqual( done, { alt1: true, alt2: true }, "Queue ran the proper functions" );
- setTimeout( start, 2000 );
+ setTimeout(function() {
+ start();
+ }, 1500 );
});
asyncTest( "queue stop hooks", 2, function() {