Redux TDD
Install
npm install --save redux-tdd
import reduxTdd from 'redux-tdd';
reduxTdd({ counter: counterReducer }, state =>
<Counter
onClick={incrementAction}
counter={state.counter.count} />
)
.action(props => props.onClick())
.toMatchProps({ counter: 1 })
.contains(<span>1</span>)
About
Read more about this technique in our freeCodeCamp article: https://medium.freecodecamp.org/test-driven-development-with-react-and-redux-using-redux-tdd-3fd3be299918
Also to learn more in depth how to use Redux TDD please look inside the /test
folder.