Skip to content

Commit

Permalink
Add some basic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlanciaux committed Mar 14, 2016
1 parent 75c252d commit 1aaef4e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scripts/__tests__/griddle-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,17 @@ describe('Griddle', function() {
expect(grid.state.filteredResults).toBe(null);
});

it('adds column filter on filterByColumn', function() {
grid.filterByColumn('test', 'name');
expect(grid.state.columnFilters).toEqual({ name: 'test' })
});

it('removes column filter when empty', function() {
grid.filterByColumn('test', 'name');
grid.filterByColumn('', 'name');
expect(grid.state.columnFilters).toEqual({});
})

//TODO: getExternalResults

it('sets the page size when a number is passed in to setPageSize', function(){
Expand Down

0 comments on commit 1aaef4e

Please sign in to comment.