'jul', 'aug', 'sep', 'oct', 'nov', 'dec' ]
},
names: [ 'January', 'February', 'March', 'April', 'May', 'June',
- 'July', 'August', 'September', 'October', 'November', 'December' ],
+ 'July', 'August', 'September', 'October', 'November', 'December' ],
genitive: [ 'January', 'February', 'March', 'April', 'May', 'June',
- 'July', 'August', 'September', 'October', 'November', 'December' ],
+ 'July', 'August', 'September', 'October', 'November', 'December' ],
abbrev: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
- 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]
+ 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]
};
},
teardown: function () {
$tr.appendTo( $thead );
for ( i = 0; i < data.length; i++ ) {
- /*jshint loopfunc: true */
$tr = $( '<tr>' );
+ // eslint-disable-next-line no-loop-func
$.each( data[ i ], function ( j, str ) {
var $td = $( '<td>' );
$td.text( str ).appendTo( $tr );
simple,
simpleAsc,
function ( $table ) {
+ var event;
$table.tablesorter(
{ sortList: [ { 0: 'desc' }, { 1: 'desc' } ] }
);
$table.find( '.headerSort:eq(0)' ).click();
// Pretend to click while pressing the multi-sort key
- var event = $.Event( 'click' );
+ event = $.Event( 'click' );
event[ $table.data( 'tablesorter' ).config.sortMultiSortKey ] = true;
$table.find( '.headerSort:eq(1)' ).trigger( event );
}
);
- QUnit.test( 'Reset sorting making table appear unsorted', 3, function ( assert ) {
+ QUnit.test( 'Reset sorting making table appear unsorted', function ( assert ) {
var $table = tableCreate( header, simple );
$table.tablesorter(
{ sortList: [
}
);
- QUnit.test( 'Basic planet table: one unsortable column', 3, function ( assert ) {
+ QUnit.test( 'Basic planet table: one unsortable column', function ( assert ) {
var $table = tableCreate( header, planets ),
$cell;
$table.find( 'tr:eq(0) > th:eq(0)' ).addClass( 'unsortable' );
// Regression tests!
tableTest(
- 'Bug 28775: German-style (dmy) short numeric dates',
+ 'T30775: German-style (dmy) short numeric dates',
[ 'Date' ],
[
// German-style dates are day-month-year
);
tableTest(
- 'Bug 28775: American-style (mdy) short numeric dates',
+ 'T30775: American-style (mdy) short numeric dates',
[ 'Date' ],
[
// American-style dates are month-day-year
);
tableTest(
- 'Bug 17141: IPv4 address sorting',
+ 'T19141: IPv4 address sorting',
[ 'IP' ],
ipv4,
ipv4Sorted,
}
);
tableTest(
- 'Bug 17141: IPv4 address sorting (reverse)',
+ 'T19141: IPv4 address sorting (reverse)',
[ 'IP' ],
ipv4,
reversed( ipv4Sorted ),
}
);
- QUnit.test( 'Rowspan not exploded on init', 1, function ( assert ) {
+ QUnit.test( 'Rowspan not exploded on init', function ( assert ) {
var $table = tableCreate( header, planets );
// Modify the table to have a multiple-row-spanning cell:
}
);
- QUnit.test( 'Test detection routine', 1, function ( assert ) {
+ QUnit.test( 'Test detection routine', function ( assert ) {
var $table;
$table = $(
'<table class="sortable">' +
} );
/** FIXME: the diff output is not very readeable. */
- QUnit.test( 'bug 32047 - caption must be before thead', 1, function ( assert ) {
+ QUnit.test( 'T34047 - caption must be before thead', function ( assert ) {
var $table;
$table = $(
'<table class="sortable">' +
assert.equal(
$table.children().get( 0 ).nodeName,
'CAPTION',
- 'First element after <thead> must be <caption> (bug 32047)'
+ 'First element after <thead> must be <caption> (T34047)'
);
} );
- QUnit.test( 'data-sort-value attribute, when available, should override sorting position', 3, function ( assert ) {
+ QUnit.test( 'data-sort-value attribute, when available, should override sorting position', function ( assert ) {
var $table, data;
// Example 1: All cells except one cell without data-sort-value,
], 'Order matches expected order (based on data-sort-value attribute values)' );
// Example 3: Test that live changes are used from data-sort-value,
- // even if they change after the tablesorter is constructed (bug 38152).
+ // even if they change after the tablesorter is constructed (T40152).
$table = $(
'<table class="sortable"><thead><tr><th>Data</th></tr></thead>' +
'<tbody>' +
.tablesorter()
.find( '.headerSort:eq(0)' ).click();
- // Change the sortValue data properties (bug 38152)
+ // Change the sortValue data properties (T40152)
// - change data
$table.find( 'td:contains(A)' ).data( 'sortValue', 3 );
// - add data
} );
- tableTest( 'bug 8115: sort numbers with commas (ascending)',
+ tableTest( 'T10115: sort numbers with commas (ascending)',
[ 'Numbers' ], numbers, numbersAsc,
function ( $table ) {
$table.tablesorter();
}
);
- tableTest( 'bug 8115: sort numbers with commas (descending)',
+ tableTest( 'T10115: sort numbers with commas (descending)',
[ 'Numbers' ], numbers, reversed( numbersAsc ),
function ( $table ) {
$table.tablesorter();
$table.find( '.headerSort:eq(0)' ).click().click();
}
);
- // TODO add numbers sorting tests for bug 8115 with a different language
+ // TODO add numbers sorting tests for T10115 with a different language
- QUnit.test( 'bug 32888 - Tables inside a tableheader cell', 2, function ( assert ) {
+ QUnit.test( 'T34888 - Tables inside a tableheader cell', function ( assert ) {
var $table;
$table = $(
'<table class="sortable" id="mw-bug-32888">' +
assert.equal(
$table.find( '> thead:eq(0) > tr > th.headerSort' ).length,
1,
- 'Child tables inside a headercell should not interfere with sortable headers (bug 32888)'
+ 'Child tables inside a headercell should not interfere with sortable headers (T34888)'
);
assert.equal(
$( '#mw-bug-32888-2' ).find( 'th.headerSort' ).length,
0,
- 'The headers of child tables inside a headercell should not be sortable themselves (bug 32888)'
+ 'The headers of child tables inside a headercell should not be sortable themselves (T34888)'
);
} );
}
);
- QUnit.test( 'Sorting images using alt text', 1, function ( assert ) {
+ QUnit.test( 'Sorting images using alt text', function ( assert ) {
var $table = $(
'<table class="sortable">' +
'<tr><th>THEAD</th></tr>' +
);
} );
- QUnit.test( 'Sorting images using alt text (complex)', 1, function ( assert ) {
+ QUnit.test( 'Sorting images using alt text (complex)', function ( assert ) {
var $table = $(
'<table class="sortable">' +
'<tr><th>THEAD</th></tr>' +
);
} );
- QUnit.test( 'Sorting images using alt text (with format autodetection)', 1, function ( assert ) {
+ QUnit.test( 'Sorting images using alt text (with format autodetection)', function ( assert ) {
var $table = $(
'<table class="sortable">' +
'<tr><th>THEAD</th></tr>' +
);
} );
- QUnit.test( 'bug 38911 - The row with the largest amount of columns should receive the sort indicators', 3, function ( assert ) {
+ QUnit.test( 'T40911 - The row with the largest amount of columns should receive the sort indicators', function ( assert ) {
var $table = $(
'<table class="sortable">' +
'<thead>' +
);
} );
- QUnit.test( 'rowspans in table headers should prefer the last row when rows are equal in length', 2, function ( assert ) {
+ QUnit.test( 'rowspans in table headers should prefer the last row when rows are equal in length', function ( assert ) {
var $table = $(
'<table class="sortable">' +
'<thead>' +
);
} );
- QUnit.test( 'holes in the table headers should not throw JS errors', 2, function ( assert ) {
+ QUnit.test( 'holes in the table headers should not throw JS errors', function ( assert ) {
var $table = $(
'<table class="sortable">' +
'<thead>' +
);
} );
- // bug 53527
- QUnit.test( 'td cells in thead should not be taken into account for longest row calculation', 2, function ( assert ) {
+ // T55527
+ QUnit.test( 'td cells in thead should not be taken into account for longest row calculation', function ( assert ) {
var $table = $(
'<table class="sortable">' +
'<thead>' +
);
} );
- // bug 41889 - exploding rowspans in more complex cases
+ // T43889 - exploding rowspans in more complex cases
tableTestHTML(
'Rowspan exploding with row headers',
'<table class="sortable">' +
]
);
- // bug 53211 - exploding rowspans in more complex cases
+ // T55211 - exploding rowspans in more complex cases
QUnit.test(
- 'Rowspan exploding with row headers and colspans', 1, function ( assert ) {
+ 'Rowspan exploding with row headers and colspans', function ( assert ) {
var $table = $( '<table class="sortable">' +
'<thead><tr><th rowspan="2">n</th><th colspan="2">foo</th><th rowspan="2">baz</th></tr>' +
'<tr><th>foo</th><th>bar</th></tr></thead>' +
]
);
- QUnit.test( 'bug 105731 - incomplete rows in table body', 3, function ( assert ) {
+ QUnit.test( 'T105731 - incomplete rows in table body', function ( assert ) {
var $table, parsers;
$table = $(
'<table class="sortable">' +
assert.equal(
parsers[ 1 ].format( $table.find( 'tbody > tr > td:eq(1)' ).text() ),
- 0,
- 'empty cell is sorted as number 0'
+ -Infinity,
+ 'empty cell is sorted as number -Infinity'
);
} );
- QUnit.test( 'bug T114721 - use of expand-child class', 2, function ( assert ) {
+ QUnit.test( 'bug T114721 - use of expand-child class', function ( assert ) {
var $table, parsers;
$table = $(
'<table class="sortable">' +