From e68ae867b31c819818024a1103695fd65c707ac4 Mon Sep 17 00:00:00 2001 From: m-tartari <37861893+m-tartari@users.noreply.github.com> Date: Sat, 17 Feb 2024 17:38:30 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20test(App):=20add=20unit=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.test.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/App.test.tsx diff --git a/src/App.test.tsx b/src/App.test.tsx new file mode 100644 index 0000000..a64c386 --- /dev/null +++ b/src/App.test.tsx @@ -0,0 +1,13 @@ +import { render, screen } from '@testing-library/react' + +import App from './App' + +describe('App component', () => { + test('renders MainPage without crashing', async () => { + render() + + expect(screen.getByLabelText('loading-screen')).toBeInTheDocument() + expect(await screen.findByText('Robotics Engineer')).toBeInTheDocument() + expect(screen.queryByLabelText('loading-screen')).not.toBeInTheDocument() + }) +})