{"size": 1237, "ext": "js", "max_stars_repo_path": "config/setupTests.js", "max_stars_repo_name": "BlakeHolifield/insights-inventory-frontend", "max_stars_repo_stars_event_min_datetime": "2020-05-06T16:16:31.000Z", "max_stars_repo_stars_event_max_datetime": "2021-11-27T03:46:04.000Z", "max_issues_repo_path": "config/setupTests.js", "max_issues_repo_name": "BlakeHolifield/insights-inventory-frontend", "max_issues_repo_issues_event_min_datetime": "2018-08-21T11:35:19.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-31T14:25:10.000Z", "max_forks_repo_path": "config/setupTests.js", "max_forks_repo_name": "BlakeHolifield/insights-inventory-frontend", "max_forks_repo_forks_event_min_datetime": "2018-08-17T12:00:02.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-16T20:28:54.000Z"}
{"max_stars_count": 6, "max_issues_count": 1272, "max_forks_count": 33, "avg_line_length": 28.7674418605, "max_line_length": 68, "alphanum_fraction": 0.5012126112}
/* eslint-disable camelcase */
import { configure, mount, render, shallow } from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
import React from 'react';
import 'whatwg-fetch';
jest.mock('react', () => ({
    ...jest.requireActual('react'),
    useLayoutEffect: jest.requireActual('react').useEffect
}));

configure({ adapter: new Adapter() });

global.insights = {
    chrome: {
        auth: {
            getUser: () => Promise.resolve({
                identity: {
                    account_number: '0',
                    type: 'User',
                    user: {
                        is_org_admin: true
                    }
                },
                entitlements: {
                    hybrid_cloud: { is_entitled: true },
                    insights: { is_entitled: true },
                    openshift: { is_entitled: true },
                    smart_management: { is_entitled: false }
                }
            })
        },
        appAction: jest.fn(),
        appObjectId: jest.fn(),
        on: jest.fn(),
        getUserPermissions: () => Promise.resolve(['inventory:*:*'])
    }
};

global.shallow = shallow;
global.render = render;
global.mount = mount;
global.React = React;
