react-stateless-wrapperdeprecated

Wraps React stateless components into regular components, for unit testing purposes.

Usage no npm install needed!

<script type="module">
  import reactStatelessWrapper from 'https://cdn.skypack.dev/react-stateless-wrapper';
</script>

README

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-dev

Usage:

import { wrap } from 'react-stateless-wrapper'
let WrappedComponent = wrap(StatelessComponent)
TestUtils.renderIntoDocument(<WrappedComponent ...props/>)