UNPKG

586 BJavaScriptView Raw
1var tf = new TableFilter('demo', {
2 base_path: '../dist/tablefilter/'
3});
4tf.init();
5
6module('Sanity checks');
7test('Only headers with no rows', function() {
8 deepEqual(tf instanceof TableFilter, true, 'TableFilter instanciated');
9 deepEqual(tf.refRow, 2, 'Reference row index');
10 deepEqual(tf.getFiltersRowIndex(), 0, 'Filters row index');
11 deepEqual(tf.getWorkingRows().length, 0, 'No working rows');
12});
13
14module('Tear-down');
15test('TableFilter removed', function() {
16 tf.destroy();
17 deepEqual(tf.isInitialized(), false, 'Filters removed');
18});