davidkpiano / Redux Test Store
Licence: mit
Test existing stores in Redux, the easy way
Programming Languages
javascript
184084 projects - #8 most used programming language
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: '[email protected]',
password: 'goat'
}));
});
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].