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();
  });
});
