1
0
Fork 0
mirror of https://github.com/koalyptus/TableFilter.git synced 2024-05-04 15:43:15 +02:00
TableFilter/test/test-one-row.js

19 lines
568 B
JavaScript
Raw Normal View History

2017-11-27 09:34:24 +01:00
var tf = new TableFilter('demo', {
2017-01-04 04:09:18 +01:00
base_path: '../dist/tablefilter/'
});
tf.init();
module('Sanity checks');
test('Only headers with no rows', function() {
deepEqual(tf instanceof TableFilter, true, 'TableFilter instanciated');
2017-11-27 09:34:24 +01:00
deepEqual(tf.refRow, 2, 'Reference row index');
deepEqual(tf.getFiltersRowIndex(), 0, 'Filters row index');
deepEqual(tf.getWorkingRows().length, 0, 'No working rows');
2017-01-04 04:09:18 +01:00
});
2017-11-30 04:00:10 +01:00
module('Tear-down');
test('TableFilter removed', function() {
tf.destroy();
deepEqual(tf.isInitialized(), false, 'Filters removed');
});