diff --git a/client/src/App.test.tsx b/client/src/App.test.tsx index 3750ecd1909509b315ffeb2942f882404d10b880..f0822a7b7c17f9ddc6a3ac487abfbad5725bc34e 100644 --- a/client/src/App.test.tsx +++ b/client/src/App.test.tsx @@ -1,4 +1,5 @@ import { render } from '@testing-library/react' +import mockedAxios from 'axios' import React from 'react' import { act } from 'react-dom/test-utils' import { Provider } from 'react-redux' @@ -7,6 +8,12 @@ import store from './store' test('renders app', async () => { await act(async () => { + const typeRes: any = { + data: { component_types: [], view_types: [], question_types: [], media_types: [] }, + } + ;(mockedAxios.get as jest.Mock).mockImplementation(() => { + return Promise.resolve(typeRes) + }) render( <Provider store={store}> <App />