import React from 'react'; import { CircularProgress } from 'material-ui-next/Progress'; import { createShallow } from 'material-ui-next/test-utils'; import { withStyles } from 'material-ui-next/styles'; import PropTypes from 'prop-types'; const style = { buttonProgress: { position: 'absolute', top: '50%', left: '50%', marginTop: -12, marginLeft: -12, }, }; const Composer = ({ classes, }) => (

); Composer.propTypes = { classes: PropTypes.object.isRequired, }; const Composition = withStyles(style)(Composer); describe('', () => { const shallow = createShallow(); it('should render CircularProgress', () => { const wrapper = shallow(); // Still need to dive(). expect(wrapper.dive().find(CircularProgress)).toHaveLength(1); }); });