Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
scurker committed Dec 18, 2024
1 parent 6d8d6ff commit 1308c4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/react/src/components/Listbox/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -647,13 +647,14 @@ test('should handle deselection selection with multiple selected options in mult
fireEvent.focus(listbox);
fireEvent.keyDown(listbox, { key: 'Enter' });

// the most recently selected item should be the initial active one
expect(handleSelectionChange).toHaveBeenCalledWith(
expect.objectContaining({
value: ['Banana'],
value: ['Apple'],
previousValue: ['Apple', 'Banana']
})
);
expect(screen.getByRole('option', { name: 'Apple' })).toHaveAttribute(
expect(screen.getByRole('option', { name: 'Banana' })).toHaveAttribute(
'aria-selected',
'false'
);
Expand Down

0 comments on commit 1308c4e

Please sign in to comment.