@@ -92,25 +92,25 @@ describe('applyMiddleware', () => {
92
92
} )
93
93
} )
94
94
95
- it ( 'passes through all arguments of dispatch calls from within middleware' , ( ) => {
96
- const spy = jest . fn ( )
97
- const testCallArgs = [ 'test' ]
98
- function multiArgMiddleware ( ) {
99
- return next => ( action , callArgs ) => {
100
- if ( Array . isArray ( callArgs ) ) {
101
- return action ( ...callArgs )
102
- }
103
- return next ( action )
104
- }
105
- }
106
- function dummyMiddleware ( { dispatch } ) {
107
- return next => action => dispatch ( action , testCallArgs )
95
+ it ( 'passes through all arguments of dispatch calls from within middleware' , ( ) => {
96
+ const spy = jest . fn ( )
97
+ const testCallArgs = [ 'test' ]
98
+ function multiArgMiddleware ( ) {
99
+ return next => ( action , callArgs ) => {
100
+ if ( Array . isArray ( callArgs ) ) {
101
+ return action ( ...callArgs )
102
+ }
103
+ return next ( action )
108
104
}
105
+ }
106
+ function dummyMiddleware ( { dispatch } ) {
107
+ return next => action => dispatch ( action , testCallArgs )
108
+ }
109
109
110
- const store = createStore ( reducers . todos , applyMiddleware ( multiArgMiddleware , dummyMiddleware ) )
111
- store . dispatch ( spy )
112
- expect ( spy . mock . calls [ 0 ] ) . toEqual ( testCallArgs )
113
- } )
110
+ const store = createStore ( reducers . todos , applyMiddleware ( multiArgMiddleware , dummyMiddleware ) )
111
+ store . dispatch ( spy )
112
+ expect ( spy . mock . calls [ 0 ] ) . toEqual ( testCallArgs )
113
+ } )
114
114
115
115
it ( 'keeps unwrapped dispatch available while middleware is initializing' , ( ) => {
116
116
// This is documenting the existing behavior in Redux 3.x.
0 commit comments