start
This commit is contained in:
16
src/components/layouts/main/__tests__/header.test.tsx
Normal file
16
src/components/layouts/main/__tests__/header.test.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { renderWithClient } from '../../../../utils/test/react-query';
|
||||
import { MemoryRouter } from 'react-router-dom';
|
||||
import Header from '../header';
|
||||
|
||||
describe('Header component', () => {
|
||||
test('successful render component', async () => {
|
||||
const result = renderWithClient(<Header />, MemoryRouter);
|
||||
expect(await result.findByTestId('header')).toBeInTheDocument();
|
||||
expect(await result.findByTestId('header-nav')).toBeInTheDocument();
|
||||
});
|
||||
|
||||
test('successful query component', async () => {
|
||||
const result = renderWithClient(<Header />, MemoryRouter);
|
||||
expect(await result.findByText(/Med Moshaver/i)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user