{"size": 819, "ext": "js", "max_stars_repo_path": "src/__tests__/pages/Home/ProjectPreview.test.js", "max_stars_repo_name": "alexmadeira/mark-ix", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/__tests__/pages/Home/ProjectPreview.test.js", "max_issues_repo_name": "alexmadeira/mark-ix", "max_issues_repo_issues_event_min_datetime": "2020-08-28T17:47:07.000Z", "max_issues_repo_issues_event_max_datetime": "2021-09-03T01:19:52.000Z", "max_forks_repo_path": "src/__tests__/pages/Home/ProjectPreview.test.js", "max_forks_repo_name": "alexmadeira/Mark-IX", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 2, "max_forks_count": null, "avg_line_length": 19.9756097561, "max_line_length": 60, "alphanum_fraction": 0.5299145299}
import React from 'react';

import { render } from '@testing-library/react';

import ProjectPreview from '~/pages/Home/ProjectPreview';

jest.mock('react-redux', () => ({
  useDispatch: () => jest.fn(),
  useSelector: () => ({
    state: {
      page: {
        current: '/',
      },
    },
  }),
}));

jest.mock('~/hooks/Page', () => ({
  usePage: () => ({
    isHome: true,
  }),
}));

jest.mock('~/hooks/Banner', () => ({
  useBanner: () => ({
    open: true,
    loaded: true,
    activeProject: { fields: { slug: '' } },
  }),
}));

jest.mock('~/pages/Project', () => () => <></>);

describe('Home Page: ProjectPreview', () => {
  it('should be rendered home page: ProjectPreview', () => {
    const { getByTestId } = render(<ProjectPreview />);

    expect(getByTestId('ProjectPreview')).toBeTruthy();
  });
});
