{"size": 1131, "ext": "js", "max_stars_repo_path": "games/mobile-roulette/client/src/components/LastOutcomes/LastOutcomes.test.js", "max_stars_repo_name": "ag-sbogd/mono-changelog", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "games/mobile-roulette/client/src/components/LastOutcomes/LastOutcomes.test.js", "max_issues_repo_name": "ag-sbogd/mono-changelog", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "games/mobile-roulette/client/src/components/LastOutcomes/LastOutcomes.test.js", "max_forks_repo_name": "ag-sbogd/mono-changelog", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 30.5675675676, "max_line_length": 98, "alphanum_fraction": 0.5375773652}
import React from 'react';
import { shallow } from 'enzyme';
import LastOutcomes from './LastOutcomes';

const lastOutcomes     = [
    { betType: 33, color: 'black', date: 1525967086123 },
    { betType: 33, color: 'black', date: 1525967086123 },
    { betType: 33, color: 'black', date: 1525967086123 },
];

describe(`[Component] LastOutcomes`, () => {
    it(`[LastOutcomes] - render component`, () => {
        const fncEx  = jest.fn();
        shallow(
            <LastOutcomes
                lastOutcomes={lastOutcomes}
                onNumberClick={fncEx}
            />,
        );
    });
    // The below is rather wrong because we should not stimulate click on LastOutcomes components,
    // rather Number component inside.
    // it(`[LastOutcomes] - handle click`, () => {
    //     const fncEx  = jest.fn();
    //
    //     const LOComponent = mount(
    //         <LastOutcomes
    //             lastOutcomes={lastOutcomes}
    //             onNumberClick={fncEx}
    //         />,
    //     );
    //     LOComponent.simulate('click');
    //
    //     expect(fncEx).toHaveBeenCalled();
    // });
});
