Closed dhcodes closed 7 years ago
@dhcodes It's because store.subscribe
doesn't receive the action object as an argument. The callback you pass to the subscribe
method just gets called every time a store update occurs, so in this case when hello
is called action
is undefined
.
@bonham000 sorry for not replying sooner; I guess I was asking if there'd be a way to use a test that ensured the callback returned 1, 2, and 3 and a string message per the instructions.
@dhcodes cool! I just modified the test to verify that at least the user is console.log
ing a string. Based on the instructions I don't think we can verify anything beyond that.
I think there's an issue with the tests for Redux 09 in that the tests don't seem to ensure that the action is correctly logged. Below is my code that passes the test but results in
undefined
being logged 3 times: