Skip to content

Commit

Permalink
fixed:#2475 Refactor: src/components/AddOn/support/components/MainCon…
Browse files Browse the repository at this point in the history
…tent/MainContent.test.tsx from Jest to Vitest (#2843)

* fixed-2475-fixed

* removed import
  • Loading branch information
gurramkarthiknetha authored Dec 25, 2024
1 parent d697f6f commit ce358e5
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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';

Expand All @@ -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(
<BrowserRouter>
<Provider store={store}>
Expand All @@ -20,7 +21,7 @@ describe('Testing MainContent component', () => {
</BrowserRouter>,
);

expect(getByTestId('mainContentCheck')).toBeInTheDocument();
expect(getByText(props.children)).toBeInTheDocument();
expect(getByTestId('mainContentCheck')).not.toBeNull();
expect(getByText(props.children)).not.toBeNull();
});
});

0 comments on commit ce358e5

Please sign in to comment.