redux-form-test-wrapper
v0.1.3
Published
Write redux-form tests with jest's snapshots or enzyme's mounting without headhache.
Downloads
8
Readme
redux-form-jest.
Write redux-form tests with jest's snapshots or enzyme's mounting without headhache.
Prerequisites
You will need the following things properly installed on your computer:
Installation
yarn -D redux-form-test-wrapper
Usage
Most basic usage using react-test-renderer:
const tree = renderer.create(
<ReduxFormTestWrapper>
<TestedComponent
someProp='a duck'
/>
</ReduxFormTestWrapper>,
).toJSON();
You can also pass mocked store as a prop like:
<ReduxFormTestWrapper store={yourMockedStore}>
<TestedComponent
someProp='a duck'
/>
</ReduxFormTestWrapper>