1.0.9 • Published 1 year ago
react-stateless-wrapper v1.0.9
Deprecated, there are better options now, check out Enzyme
Wraps React stateless components into regular components, for unit testing purposes.
npm install react-stateless-wrapper --save-devUsage:
import { wrap } from 'react-stateless-wrapper'
let WrappedComponent = wrap(StatelessComponent)
TestUtils.renderIntoDocument(<WrappedComponent ...props/>)