+/** FIXME: the diff output is not very readeable. */
+test( 'bug 32047 - caption must be before thead', function() {
+ var $table;
+ $table = $(
+ '<table class="sortable">' +
+ '<caption>CAPTION</caption>' +
+ '<tr><th>THEAD</th></tr>' +
+ '<tr><td>A</td></tr>' +
+ '<tr><td>B</td></tr>' +
+ '<tr class="sortbottom"><td>TFOOT</td></tr>' +
+ '</table>'
+ );
+ console.log( $table.html() );
+ $table.tablesorter();
+ console.log( $table.html() );
+ var expected =
+ '<caption>CAPTION</caption>'+
+ '<thead>' +
+ '<tr><th title=\"<sort-ascending>\" class=\"headerSort\">THEAD</th></tr>' +
+ '</thead>' +
+ '<tbody><tr><td>A</td></tr>' +
+ '<tr><td>B</td></tr>' +
+ '<tr class=\"sortbottom\"><td>TFOOT</td></tr>' +
+ '</tbody><tfoot></tfoot>';
+ deepEqual( $table.html(), expected, '<caption> must be placed before <thead> (bug 32047)' );
+});
+