import React from 'react';
import { BrowserRouter as Router } from 'react-router-dom';
import { render, fireEvent } from '../../utils/test-react-testing-library';
import NotFound from './NotFound';
describe(' component', () => {
test('should load the component in default state', () => {
const { container } = render(
);
expect(container.firstChild).toMatchSnapshot();
});
test('go to Home Page button click', async () => {
const spy = jest.spyOn(React, 'useCallback');
const { getByTestId } = render(
);
const node = getByTestId('not-found-go-to-home-button');
fireEvent.click(node);
expect(spy).toHaveBeenCalled();
});
});