npm i redux-devtools-gentest-plugin --save-dev
To use it with redux-devtools in your project you only need to add
import {TestMonitor} from 'redux-devtools-gentest-plugin';
...
<DebugPanel top left bottom>
<DevTools store={store}
monitor={TestMonitor}/>
</DebugPanel>
(look at */todomvc/containers/App.js file)
to export tests click Copy To Buffer button in the end of left panel.
generated tests are a little bit specific for now they look for reducers in upper directory
import * as reducers from '../reducers';
You can do this:
git clone https://github.com/lapanoid/redux-devtools-gentest-plugin.git
cd redux-devtools
npm install
cd examples/counter
OR
cd examples/todomvc
npm install
npm start
open http://localhost:3000
check out exported tests here
todomvc/tests/generatedTests.js
you can run it with
mocha --compilers js:babel/register generatedTests.js
MIT