diff --git a/app/soapbox/features/feed-filtering/__tests__/feed-carousel.test.tsx b/app/soapbox/features/feed-filtering/__tests__/feed-carousel.test.tsx index e01a32e9e2..350cf385f6 100644 --- a/app/soapbox/features/feed-filtering/__tests__/feed-carousel.test.tsx +++ b/app/soapbox/features/feed-filtering/__tests__/feed-carousel.test.tsx @@ -137,9 +137,7 @@ describe('', () => { expect(screen.queryAllByTestId('prev-page')).toHaveLength(0); }); - await waitFor(() => { - user.click(screen.getByTestId('next-page')); - }); + await user.click(screen.getByTestId('next-page')); await waitFor(() => { expect(screen.getByTestId('prev-page')).toBeInTheDocument(); diff --git a/app/soapbox/jest/test-helpers.tsx b/app/soapbox/jest/test-helpers.tsx index 657919b5ad..b7223caca9 100644 --- a/app/soapbox/jest/test-helpers.tsx +++ b/app/soapbox/jest/test-helpers.tsx @@ -1,4 +1,5 @@ import { configureMockStore } from '@jedmao/redux-mock-store'; +import { QueryClientProvider } from '@tanstack/react-query'; import { render, RenderOptions } from '@testing-library/react'; import { merge } from 'immutable'; import React, { FC, ReactElement } from 'react'; @@ -9,6 +10,8 @@ import { Action, applyMiddleware, createStore } from 'redux'; import thunk from 'redux-thunk'; import '@testing-library/jest-dom'; +import { queryClient } from 'soapbox/queries/client'; + import NotificationsContainer from '../features/ui/containers/notifications_container'; import { default as rootReducer } from '../reducers'; @@ -45,13 +48,15 @@ const TestApp: FC = ({ children, storeProps, routerProps = {} }) => { return ( - - - {children} + + + + {children} - - - + + + + ); };