{"size": 914, "ext": "js", "max_stars_repo_path": "src/core/ui/components/ThumbnailImage/ThumbnailImage.test.js", "max_stars_repo_name": "COMATCH/comatch-ui", "max_stars_repo_stars_event_min_datetime": "2018-11-14T07:14:01.000Z", "max_stars_repo_stars_event_max_datetime": "2020-10-08T17:15:34.000Z", "max_issues_repo_path": "src/core/ui/components/ThumbnailImage/ThumbnailImage.test.js", "max_issues_repo_name": "COMATCH/comatch-ui", "max_issues_repo_issues_event_min_datetime": "2019-01-17T15:46:57.000Z", "max_issues_repo_issues_event_max_datetime": "2021-10-05T20:42:01.000Z", "max_forks_repo_path": "src/core/ui/components/ThumbnailImage/ThumbnailImage.test.js", "max_forks_repo_name": "COMATCH/comatch-ui", "max_forks_repo_forks_event_min_datetime": "2019-08-06T12:29:32.000Z", "max_forks_repo_forks_event_max_datetime": "2019-08-06T12:29:32.000Z"}
{"max_stars_count": 12, "max_issues_count": 16, "max_forks_count": 1, "avg_line_length": 32.6428571429, "max_line_length": 92, "alphanum_fraction": 0.6258205689}
import React from 'react';
import renderer from 'react-test-renderer';
import { ThumbnailImage } from './ThumbnailImage';
import '../../../config/tests/setup';

describe('ThumbnailImage', () => {
    it('should render with default profile picture with alt correctly', () => {
        const table = renderer.create(
            <ThumbnailImage alt="picture description" />).toJSON();

        expect(table).toMatchSnapshot();
    });

    it('should render with src picture correctly', () => {
        const table = renderer.create(
            <ThumbnailImage src="sample-picture.jpg" alt="picture description" />).toJSON();

        expect(table).toMatchSnapshot();
    });

    it('should render with no placeholder correctly', () => {
        const table = renderer.create(
            <ThumbnailImage placeholder="" alt="picture description" />).toJSON();

        expect(table).toMatchSnapshot();
    });
});
