Skip to content

Commit

Permalink
test(filter): tests for filter without cond #4897
Browse files Browse the repository at this point in the history
  • Loading branch information
tachojelev committed May 28, 2019
1 parent 6249137 commit 096283d
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,20 @@ describe('IgxGrid - Filtering actions', () => {
verifyExpressionUI(expressionUIs[3], expression21, FilteringLogic.And, FilteringLogic.Or);
verifyExpressionUI(expressionUIs[4], expression22, null, FilteringLogic.And);
}));

it('Should throw descriptive error when filter() is called without condition', fakeAsync(() => {
expect(() => {
grid.filter('Downloads', 100);
fix.detectChanges();
}).toThrowError('Invalid condition or Expression Tree!');
}));

it('Should throw descriptive error when filterGlobal() is called without condition', fakeAsync(() => {
expect(() => {
grid.filterGlobal(100);
fix.detectChanges();
}).toThrowError('Invalid condition!');
}));
});

const expectedResults = [];
Expand Down

0 comments on commit 096283d

Please sign in to comment.