diff --git a/src/studio-home/tabs-section/courses-tab/courses-filters/index.test.jsx b/src/studio-home/tabs-section/courses-tab/courses-filters/index.test.jsx index 02d69e284a..45f4b0820d 100644 --- a/src/studio-home/tabs-section/courses-tab/courses-filters/index.test.jsx +++ b/src/studio-home/tabs-section/courses-tab/courses-filters/index.test.jsx @@ -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 });