import React, { Component } from 'react';
import PropTypes from 'prop-types';
/**
* jest.mock('components/Foo', () => mockComponent('Foo'));
*/
export const mockComponent = ComponentName =>
class extends Component {
static propTypes = new Proxy(
{},
{
get: () => PropTypes.any,
},
);
render() {
return <ComponentName {...this.props} />;
}
};