UNPKG

534 BJavaScriptView Raw
1var tf = new TableFilter('demo', 0, {
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.nbCells, 0, 'Number of columns');
10 deepEqual(tf.refRow, 1, 'Reference row index');
11});
12
13module('Tear-down');
14test('TableFilter removed', function() {
15 tf.clearFilters();
16 tf.destroy();
17 deepEqual(tf.isInitialized(), false, 'Filters removed');
18});