r90635 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90634‎ | r90635 | r90636 >
Date:23:47, 22 June 2011
Author:brion
Status:ok
Tags:
Comment:
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. :)
Modified paths:
  • /trunk/phase3/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js
@@ -78,17 +78,11 @@
7979
8080 // Give caller a chance to set up sorting and manipulate the table.
8181 callback( $table );
82 -
83 - // Table sorting is done asynchronously in the event loop by running
84 - // it through a setTimeout({},0); we need to do the same so we can
85 - // check our results after.
86 - stop( 1000 ); // timeout in 1s
87 - setTimeout(function() {
88 - start(); // continue the async tests...
8982
90 - var extracted = tableExtract( $table );
91 - deepEqual( extracted, expected, msg )
92 - }, 150);
 83+ // Table sorting is done synchronously; if it ever needs to change back
 84+ // to asynchronous, we'll need a timeout or a callback here.
 85+ var extracted = tableExtract( $table );
 86+ deepEqual( extracted, expected, msg )
9387 });
9488 };
9589

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r90595Add initial QUnit JS test cases for jquery.tablesorter -- NOTE THERE ARE IN F...brion19:30, 22 June 2011
r90626Tablesorter: Remove not really necessary setTimeout.diebuche23:03, 22 June 2011

Status & tagging log