From db056975aa6a54c2b3b893b7f78f88eddf4ee1b4 Mon Sep 17 00:00:00 2001 From: Arthi-chaud Date: Mon, 11 Jul 2022 11:10:00 +0200 Subject: [PATCH] Front: Fix unit test w/ React Paper integration --- front/App.test.tsx | 6 +++--- front/App.tsx | 10 ++++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/front/App.test.tsx b/front/App.test.tsx index 5fadc03..7a7e434 100644 --- a/front/App.test.tsx +++ b/front/App.test.tsx @@ -1,11 +1,11 @@ import React from 'react'; import TestRenderer from 'react-test-renderer'; -import App from './App'; +import { AppContent } from './App'; -describe('', () => { +describe('', () => { it('has 1 child', () => { - const tree = TestRenderer.create().toJSON(); + const tree = TestRenderer.create().toJSON(); expect(tree.children.length).toBe(10); }); }); diff --git a/front/App.tsx b/front/App.tsx index a1f2aee..7c36f58 100644 --- a/front/App.tsx +++ b/front/App.tsx @@ -9,9 +9,8 @@ const ExampleBox = (props: { textColor: ColorValue, backgroundColor: ColorValue ) -export default function App() { +export function AppContent() { return ( - @@ -31,6 +30,13 @@ export default function App() { /> + ); +} + +export default function App() { + return ( + + ); }