Skip to content

Commit 84db208

Browse files
Normalize indentation on applyMiddleware.spec.js
1 parent 3bcce6c commit 84db208

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

test/applyMiddleware.spec.js

+17-17
Original file line numberDiff line numberDiff line change
@@ -92,25 +92,25 @@ describe('applyMiddleware', () => {
9292
})
9393
})
9494

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)
108104
}
105+
}
106+
function dummyMiddleware({ dispatch }) {
107+
return next => action => dispatch(action, testCallArgs)
108+
}
109109

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+
})
114114

115115
it('keeps unwrapped dispatch available while middleware is initializing', () => {
116116
// This is documenting the existing behavior in Redux 3.x.

0 commit comments

Comments
 (0)