Skip to content

Commit

Permalink
fix: fix failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
pkulkark committed Sep 6, 2024
1 parent 9ceb989 commit 1a1c8c2
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ describe('CoursesFilters', () => {

it('should not call dispatch when the search input contains only spaces', async () => {
renderComponent();
expect(dispatchMock).toHaveBeenCalled();
dispatchMock.mockClear();
const searchInput = screen.getByRole('searchbox');
fireEvent.change(searchInput, { target: { value: ' ' } });
await waitFor(() => expect(dispatchMock).not.toHaveBeenCalled(), { timeout: 500 });
Expand Down

0 comments on commit 1a1c8c2

Please sign in to comment.