Skip to content
Snippets Groups Projects
Commit 75150123 authored by Albin Henriksson's avatar Albin Henriksson
Browse files

Fix tests

parent 8e0eb6dc
No related branches found
No related tags found
No related merge requests found
Pipeline #41352 passed with warnings
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 />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment