Skip to content

Any examples for thunk middleware dispatching #21

@vojtatranta

Description

@vojtatranta

Do we know about any real-world examples of testing async action creators?
I struggle to test creators like this:

function add(entity) {
  return dispatch => {
    dispatch({
     type: ADD,
    payload: entity
   })
  }
}

I looked at test here, but it gave me no clue.
Do I have to mock dispatch function or something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions