Skip to content

Commit

Permalink
Add another value for blank equality comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
thyeggman committed Sep 18, 2023
1 parent 40f1ea6 commit 1e2af28
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/DataTable/__tests__/DataTable.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,14 @@ describe('DataTable', () => {
},
{
id: 3,
value: 3,
value: '',
},
{
id: 4,
value: 3,
},
{
id: 5,
value: 1,
},
]}
Expand Down Expand Up @@ -604,7 +608,7 @@ describe('DataTable', () => {
return cell.textContent
})

expect(rows).toEqual(['3', '2', '1', ''])
expect(rows).toEqual(['3', '2', '1', '', ''])

// Change to ascending
await user.click(screen.getByText('Value'))
Expand All @@ -619,7 +623,7 @@ describe('DataTable', () => {
return cell.textContent
})

expect(rows).toEqual(['1', '2', '3', ''])
expect(rows).toEqual(['1', '2', '3', '', ''])
})

it('should change the sort direction on mouse click', async () => {
Expand Down

0 comments on commit 1e2af28

Please sign in to comment.