diff options
author | Timmy Willison <timmywillisn@gmail.com> | 2013-04-09 11:45:09 -0400 |
---|---|---|
committer | Timmy Willison <timmywillisn@gmail.com> | 2013-04-09 11:59:31 -0400 |
commit | 0fa52c11cbfe70780648b99717f1dd3502befaff (patch) | |
tree | 9cd6bfc3b17ae21385aeebd32205d7281934fa17 /test/unit/queue.js | |
parent | 0afc92bd73a61a0279a419647458e6ed89638ae0 (diff) | |
download | jquery-0fa52c11cbfe70780648b99717f1dd3502befaff.tar.gz jquery-0fa52c11cbfe70780648b99717f1dd3502befaff.zip |
Update jshintrc to conform to new style guide. Conform to onevar and unused in tests. Fixes #13755.
Diffstat (limited to 'test/unit/queue.js')
-rw-r--r-- | test/unit/queue.js | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/test/unit/queue.js b/test/unit/queue.js index 5328d608a..f60d802fb 100644 --- a/test/unit/queue.js +++ b/test/unit/queue.js @@ -1,12 +1,11 @@ module( "queue", { teardown: moduleTeardown }); test( "queue() with other types", 14, function() { - var counter = 0; - stop(); var $div = jQuery({}), - defer; + counter = 0; + $div.promise( "foo" ).done(function() { equal( counter, 0, "Deferred for collection with no queue is automatically resolved" ); }); @@ -56,8 +55,8 @@ test( "queue() with other types", 14, function() { test("queue(name) passes in the next item in the queue as a parameter", function() { expect(2); - var div = jQuery({}); - var counter = 0; + var div = jQuery({}), + counter = 0; div.queue("foo", function(next) { equal(++counter, 1, "Dequeueing"); @@ -76,8 +75,8 @@ test("queue() passes in the next item in the queue as a parameter to fx queues", expect(3); stop(); - var div = jQuery({}); - var counter = 0; + var div = jQuery({}), + counter = 0; div.queue(function(next) { equal(++counter, 1, "Dequeueing"); @@ -148,14 +147,14 @@ test("clearQueue(name) clears the queue", function() { stop(); - var div = jQuery({}); - var counter = 0; + var div = jQuery({}), + counter = 0; - div.queue("foo", function(next) { + div.queue("foo", function( next ) { counter++; jQuery(this).clearQueue("foo"); next(); - }).queue("foo", function( next ) { + }).queue("foo", function() { counter++; }); @@ -172,14 +171,14 @@ test("clearQueue(name) clears the queue", function() { test("clearQueue() clears the fx queue", function() { expect(1); - var div = jQuery({}); - var counter = 0; + var div = jQuery({}), + counter = 0; - div.queue(function(next) { + div.queue(function( next ) { counter++; var self = this; setTimeout(function() { jQuery(self).clearQueue(); next(); }, 50); - }).queue(function( next ) { + }).queue(function() { counter++; }); @@ -251,8 +250,8 @@ asyncTest( "fn.promise( \"queue\" ) - waits for animation to complete before res test( ".promise(obj)", function() { expect(2); - var obj = {}; - var promise = jQuery( "#foo" ).promise( "promise", obj ); + var obj = {}, + promise = jQuery( "#foo" ).promise( "promise", obj ); ok( jQuery.isFunction( promise.promise ), ".promise(type, obj) returns a promise" ); strictEqual( promise, obj, ".promise(type, obj) returns obj" ); |