0.5.0 • Published 8 years ago

redux-test-store v0.5.0

Weekly downloads
1,346
License
MIT
Repository
github
Last release
8 years ago

redux-test-store

Test existing stores in Redux, the easy way

Quick Start

  • npm install redux-test-store --save-dev
  • Import it:
import createTestStore from 'redux-test-store';

import store from '../path/to/real/store';

describe('auth action creators', () => {
  it('should authenticate successfully', (done) => {
    let tokenSet = [{token: 1}, {token: 2}];

    const testStore = createTestStore(store, done);

    testStore.when(actionTypes.CHANGE, (state, action) => {
      assert.deepEqual(state.auth.sets, tokenSet);
    });

    testStore.dispatch(actions.authenticate({
      email: 'foo@bar.com',
      password: 'goat'
    }));
  });
0.5.0

8 years ago

0.4.0

8 years ago

0.3.2

8 years ago

0.3.1

8 years ago

0.3.0

8 years ago

0.2.0

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago