Am not able to Cover the following lines of code?
this.dataSource.sortingDataAccessor = (item, property) => {
switch (property) {
case 'status': return item.status;
case 'description': return item.description;
default: return item[property];
}
};
Hi,
You can call the function itself. Example:
const sortable = this.dataSource.sortingDataAccessor(row, columnName); //a single row and the column you want to sort
expect(sortable).toBe(row.columnName);