1.0.1 • Published 9 years ago

redux-promise-test v1.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
9 years ago

redux-promise-test

Build Status

Create redux-promise action results for your reducer tests. It's based on the sequence branch.

import * as reduxPromiseTest from 'redux-promise-test';

reduxPromiseTest.start('ACTION');
// => {
//  type: 'ACTION',
//  payload: undefined,
//  sequence: {
//    type: 'start',
//    id: 1
//  }
// }

reduxPromiseTest.next('ACTION');
// => {
//  type: 'ACTION',
//  payload: {},
//  sequence: {
//    type: 'next',
//    id: 1
//  }
// }

reduxPromiseTest.error('ACTION');
// => {
//  error: true,
//  type: 'ACTION',
//  payload: new Error(),
//  sequence: {
//    type: 'next',
//    id: 1
//  }
// }

See the code for more advanced usage.

MIT license