apjames93/mui-storyblok

View on GitHub
src/lib/components/PageGrid/atoms/Video/Video.test.js

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react';
import { shallow } from 'enzyme';
import renderer from 'react-test-renderer';
import Video from './Video';

function setup() {
  const props = {
    url: 'www.asdfiojasdf.com',
  };

  const comp = shallow(<Video {...props} />);
  return { comp, props };
}

describe('<Video />', () => {
  test('snapshot', () => {
    const { props } = setup();
    const tree = renderer.create(<Video {...props} />);
    expect(tree).toMatchSnapshot();
  });

  it('should render Video', () => {
    const { comp } = setup();
    expect(comp).toMatchSnapshot();
  });
});