Middleware Test Structure
Let’s have a look at the structure we will use for middleware testing.
We'll cover the following...
The middleware is where most of the complex logic of our application will reside. Because middleware has full access to the store’s dispatch()
and getState()
methods, as well as control over the actions’ flow via next()
, middleware can become quite complex, with nontrivial asynchronous flows.
Middleware test structure
At their core, middleware are functions that receive actions to process, albeit with a complicated signature. Redux makes the first two function ...