Skip to content

Commit

Permalink
fix: test wasn't passing correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
bra-i-am committed Jan 10, 2024
1 parent 4fd7dd4 commit e7e409a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ describe('Sequence Navigation Tabs', () => {

it('renders unit buttons and dropdown button', async () => {
let container = null;
useIndexOfLastVisibleChild.mockReturnValue([-1, null, null]);
const booyah = render(<SequenceNavigationTabs {...mockData} />);
await act(async () => {
useIndexOfLastVisibleChild.mockReturnValue([-1, null, null]);
const booyah = render(<SequenceNavigationTabs {...mockData} />);
container = booyah.container;

const dropdownToggle = container.querySelector('.dropdown-toggle');
// We need to await this click here, which requires us to await the `act` as well above.
// https://github.com/testing-library/react-testing-library/issues/535
Expand Down

0 comments on commit e7e409a

Please sign in to comment.