We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 64a8c66 + e57bf27 commit f8ccc9fCopy full SHA for f8ccc9f
docs/recipes/WritingTests.md
@@ -134,13 +134,11 @@ describe('async actions', () => {
134
const store = mockStore({ todos: [] })
135
136
store.dispatch(actions.fetchTodos())
137
- .then(() => {
138
- const actions = store.getActions()
139
-
140
- expect(actions[0].type).toEqual(types.FETCH_TODOS_REQUEST)
141
142
- done()
+ .then(() => { // return of async actions
+ expect(store.getActions()).toEqual(expectedActions)
143
})
+ .then(done) // test passed
+ .catch(done) // test failed
144
145
146
```
0 commit comments