Closed stubar closed 4 years ago
I find in most test cases that I am doing a filter on getActions to make test a bit more specific. It would be handy to have a getActionsByType helper in the api so we could do a test like
expect(store.getActionsByType('modal/TOGGLE_MODAL_DIALOG')).toHaveLength(1)
Happy to raise a PR
You can easily look-up an action by type with .find() and then assert the result.
Agree with @acostalima Also, you can take a look into https://redux-things.github.io/redux-actions-assertions
I find in most test cases that I am doing a filter on getActions to make test a bit more specific. It would be handy to have a getActionsByType helper in the api so we could do a test like
Happy to raise a PR