{"size": 1942, "ext": "js", "max_stars_repo_path": "src/animations/Transform/Transform.test.js", "max_stars_repo_name": "cjthedizzy/react-animation-components", "max_stars_repo_stars_event_min_datetime": "2017-10-12T21:05:24.000Z", "max_stars_repo_stars_event_max_datetime": "2019-03-19T17:31:38.000Z", "max_issues_repo_path": "src/animations/Transform/Transform.test.js", "max_issues_repo_name": "cjthedizzy/react-animation-components", "max_issues_repo_issues_event_min_datetime": "2018-02-16T20:44:18.000Z", "max_issues_repo_issues_event_max_datetime": "2018-04-04T06:07:01.000Z", "max_forks_repo_path": "src/animations/Transform/Transform.test.js", "max_forks_repo_name": "unruffledBeaver/react-animation-components", "max_forks_repo_forks_event_min_datetime": "2020-02-07T11:19:09.000Z", "max_forks_repo_forks_event_max_datetime": "2021-09-11T12:05:52.000Z"}
{"max_stars_count": 30, "max_issues_count": 2, "max_forks_count": 4, "avg_line_length": 32.3666666667, "max_line_length": 80, "alphanum_fraction": 0.5870236869}
import React from 'react';
import Transform from './index.jsx';
import renderer from 'react-test-renderer';

describe('Transform', () => {
    test('renders', () => {
        const component = renderer.create(<Transform />);
        const tree = component.toJSON();
        expect(tree).toMatchSnapshot();
    });

    test('can accept className', () => {
        const component = renderer.create(<Transform className="test" />);
        const tree = component.toJSON();
        expect(tree).toMatchSnapshot();
    });

    test('can accept custom styles', () => {
        const component = renderer.create(
            <Transform style={{ background: 'black' }} />
        );
        const tree = component.toJSON();
        expect(tree).toMatchSnapshot();
    });

    test('sets transitionDelay with delay prop', () => {
        const component = renderer.create(<Transform delay={1000} />);
        const tree = component.toJSON();
        expect(tree).toMatchSnapshot();
    });

    test('sets transitionDuration with duration prop', () => {
        const component = renderer.create(<Transform duration={1000} />);
        const tree = component.toJSON();
        expect(tree).toMatchSnapshot();
    });

    test('sets transitionTimingFunction with timingFn prop', () => {
        const component = renderer.create(<Transform timingFn="ease-in-out" />);
        const tree = component.toJSON();
        expect(tree).toMatchSnapshot();
    });

    test('sets enterTransform', () => {
        const component = renderer.create(
            <Transform enterTransform="translateX(10em)" />
        );
        const tree = component.toJSON();
        expect(tree).toMatchSnapshot();
    });

    test('sets exitTransform', () => {
        const component = renderer.create(
            <Transform exitTransform="translateX(10em)" />
        );
        const tree = component.toJSON();
        expect(tree).toMatchSnapshot();
    });
});
