'How to write the unit test cases for filterpredict function for mat angular table
setupFilter(column: string) {
this.dataSource.filterPredicate = (d: Element, filter: string) => {
const textToSearch = d[column] && d[column].toLowerCase() || '';
return textToSearch.indexOf(filter) !== -1;
};
}
How can I write the unit test cases for this mat table setupFilter()
function.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|