From ce358e5cef115cdf1e721a14f20bc5be62ae0c16 Mon Sep 17 00:00:00 2001 From: Gurram Karthik <167804249+gurramkarthiknetha@users.noreply.github.com> Date: Wed, 25 Dec 2024 10:34:57 +0530 Subject: [PATCH] fixed:#2475 Refactor: src/components/AddOn/support/components/MainContent/MainContent.test.tsx from Jest to Vitest (#2843) * fixed-2475-fixed * removed import --- .../{MainContent.test.tsx => MainContent.spec.tsx} | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename src/components/AddOn/support/components/MainContent/{MainContent.test.tsx => MainContent.spec.tsx} (70%) diff --git a/src/components/AddOn/support/components/MainContent/MainContent.test.tsx b/src/components/AddOn/support/components/MainContent/MainContent.spec.tsx similarity index 70% rename from src/components/AddOn/support/components/MainContent/MainContent.test.tsx rename to src/components/AddOn/support/components/MainContent/MainContent.spec.tsx index 81adbc916e..90988e8d2b 100644 --- a/src/components/AddOn/support/components/MainContent/MainContent.test.tsx +++ b/src/components/AddOn/support/components/MainContent/MainContent.spec.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { render } from '@testing-library/react'; +import { describe, it, expect } from 'vitest'; import { Provider } from 'react-redux'; import { BrowserRouter } from 'react-router-dom'; @@ -11,7 +12,7 @@ describe('Testing MainContent component', () => { children: 'This is a dummy text', }; - test('should render props and children for the Main Content', () => { + it('should render props and children for the Main Content', () => { const { getByTestId, getByText } = render( @@ -20,7 +21,7 @@ describe('Testing MainContent component', () => { , ); - expect(getByTestId('mainContentCheck')).toBeInTheDocument(); - expect(getByText(props.children)).toBeInTheDocument(); + expect(getByTestId('mainContentCheck')).not.toBeNull(); + expect(getByText(props.children)).not.toBeNull(); }); });