From 7515012313014e95f1afe3dcd419811b080e037b Mon Sep 17 00:00:00 2001
From: Albin Henriksson <albhe428@student.liu.se>
Date: Tue, 20 Apr 2021 13:37:51 +0200
Subject: [PATCH] Fix tests

---
 client/src/App.test.tsx | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/client/src/App.test.tsx b/client/src/App.test.tsx
index 3750ecd1..f0822a7b 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 />
-- 
GitLab