redux-devtools-gentest-plugin

2.0.0-rc • Public • Published

redux-devtools-gentest-plugin

npm version semantic-release Build Status

DEMO

Installation

npm i redux-devtools-gentest-plugin --save-dev

Usage

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';

Running Examples

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

License

MIT

Package Sidebar

Install

npm i redux-devtools-gentest-plugin

Weekly Downloads

0

Version

2.0.0-rc

License

MIT

Last publish

Collaborators

  • lapanoid