Skip to content

Commit

Permalink
update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin Davis committed Dec 6, 2022
1 parent afb926a commit 4bb0256
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions src/components/tables/c-table/c-table.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ describe('c-table component', () => {
expect(col.sortClass).toBe(component.styles.sortDesc);
});

it('will sort desc when col reverseSort', () => {
it('will sort asc still when col reverseSort', () => {
const col: any = {
_class: 'code',
_status: 'warning',
Expand All @@ -594,25 +594,7 @@ describe('c-table component', () => {

component.setColSortClass(col);

expect(col.sortClass).toBe(component.styles.sortDesc);
});

it('will sort desc when table reverseSort', () => {
const col: any = {
_class: 'code',
_status: 'warning',
colClass: 't150',
colHeadName: 'name',
colHeadValue: 'Name',
sort: true,
};

component.reverseSort = true;
component.defaultSortCol = `${col.colHeadName}`;

component.setColSortClass(col);

expect(col.sortClass).toBe(component.styles.sortDesc);
expect(col.sortClass).toBe(component.styles.sortAsc);
});
});

Expand Down

0 comments on commit 4bb0256

Please sign in to comment.