redux-integration-store

1.0.10 • Public • Published

redux-integration-store

The basic idea behind this module is to enable users to write integration tests for their Redux-connected React components

Usage

    import setupIntegrationTest from 'redux-integration-store';

    import SomeReduxConnectedComponent from './Component';
    import reducer from './reducer/';

    describe('Test Suite', () => {

        let store;
        let dispatchSpy;

        beforeEach(() => {
            ({ store, dispatchSpy } = setupIntegrationTest(reducer, 'topLevelReducerKey'));
        });

        test('should mount', () => {
            (<Provider store={store}>
                <SomeReduxConnectedComponent />
            </Provider>);
        })

    })

Feedback

If something isn't working for you, please let me know by opening an issue on Github.

If you like this module, please STAR on Github!

Readme

Keywords

none

Package Sidebar

Install

npm i redux-integration-store

Weekly Downloads

113

Version

1.0.10

License

ISC

Unpacked Size

1.24 MB

Total Files

4

Last publish

Collaborators

  • eenewbsauce