import React from 'react';
import renderer from 'react-test-renderer'; // eslint-disable-line import/no-extraneous-dependencies

import Media from './index';

test('Media renders correctly', () => {
  const tree = renderer.create(
    <div>
      <Media
        src="https://www.youtube.com/watch?v=ELngjLHgd9U"
        type="video"
        ratio={16 / 9}
        width="300px"
        style={{ marginRight: '50px' }}
      />
      <Media src="/logo-small.svg" type="image" ratio={1} width="20%" name="flive" alt="flive" />
    </div>
  ).toJSON();
  expect(tree).toMatchSnapshot();
});
