redux-promise-test

1.0.1 • Public • Published

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

/redux-promise-test/

    Package Sidebar

    Install

    npm i redux-promise-test

    Weekly Downloads

    2

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • dariocravero