import React from 'react'; import { shallow, mount } from 'enzyme'; import Modal from '../Modal'; it('renders without crashing', () => { shallow(); }); it('receives props as expected', () =>{ const actionButton = ; const childButton = ; const wrapper = mount({childButton}); expect(wrapper.props().title).toEqual('Dummy title'); expect(wrapper.props().actions).toEqual([actionButton]); expect(wrapper.props().children).toEqual(childButton); });