From 9e8b8a0bdb202b24f1cd009397030abe104279d8 Mon Sep 17 00:00:00 2001 From: Derk-Jan Hartman Date: Wed, 6 Aug 2014 16:50:28 +0100 Subject: [PATCH] QUnit: fix swapped expected/actual fields Change-Id: I55db7e3ef4e155fb9e1152cbf777189d04eec951 --- .../resources/jquery/jquery.tablesorter.test.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js b/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js index 9216ac9173..2fd3ce9811 100644 --- a/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js +++ b/tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js @@ -1160,12 +1160,12 @@ '' ); $table.tablesorter(); - assert.equal( 0, - $table.find( '#A2' ).prop( 'headerIndex' ), - 'A2 should be a sort header' + assert.equal( $table.find( '#A2' ).prop( 'headerIndex' ), + 0, + 'A2 should not be a sort header' ); - assert.equal( 1, // should be 2 - $table.find( '#C1' ).prop( 'headerIndex' ), + assert.equal( $table.find( '#C1' ).prop( 'headerIndex' ), + 1, 'C1 should be a sort header, but will sort the wrong column' ); } ); @@ -1197,7 +1197,9 @@ '' ); $table.tablesorter(); - assert.equal( 2, $table.find( 'tr:eq(1) th:eq(1)').prop('headerIndex'), 'Incorrect index of sort header' ); + assert.equal( $table.find( 'tr:eq(1) th:eq(1)').prop('headerIndex'), + 2, + 'Incorrect index of sort header' ); } ); -- 2.20.1