import React from 'react'; import { mount, shallow } from 'enzyme'; import Media from '../Media'; jest.mock('../../../icons/general/IconEllipsis', () => () =>
); describe('components/Media', () => { test('compound component', () => { const title = (
Yo Yo Ma commented on this file
); const content =
Please review the notes
; const compoundComponent = ( some img
foo
{title} {content}
); const wrapper = mount(compoundComponent); expect(wrapper.render()).toMatchSnapshot(); }); test('"as" prop changes Media root element', () => { const wrapper = shallow( foo bar , ); const wrapperAs = shallow( foo bar , ); expect(wrapper.is('div')).toBe(true); expect(wrapperAs.is('li')).toBe(true); }); });