From 18041f7b7180a02f056b40cf839d30cd14d3fd5f Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 22 Jun 2011 23:47:29 +0000 Subject: [PATCH] Followup r90595, r90626: remove async magic from table sorter tests now that the setTimeout has been removed from the sorting click handler. Keeps things a little simpler and more reliable. :) --- .../resources/jquery/jquery.tablesorter.test.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js b/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js index a0f73d8521..1289e95180 100644 --- a/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js @@ -78,17 +78,11 @@ var tableTest = function( msg, header, data, expected, callback ) { // Give caller a chance to set up sorting and manipulate the table. callback( $table ); - - // Table sorting is done asynchronously in the event loop by running - // it through a setTimeout({},0); we need to do the same so we can - // check our results after. - stop( 1000 ); // timeout in 1s - setTimeout(function() { - start(); // continue the async tests... - - var extracted = tableExtract( $table ); - deepEqual( extracted, expected, msg ) - }, 150); + + // Table sorting is done synchronously; if it ever needs to change back + // to asynchronous, we'll need a timeout or a callback here. + var extracted = tableExtract( $table ); + deepEqual( extracted, expected, msg ) }); }; -- 2.20.1