Too Long; Didn't Read
The key is to find the action type to set to the current todo element. We want to call appReducer with an initialState object, and a second argument. This one should be an object with type = “todos/todoAdded” and a payload. And then make sure that the result contains all previous todo with the one we passed as payload. Let’s go to nextTodoId (todos.reduce(maxId, todo) and test for that in the assertion.
Share Your Thoughts