MCPcopy
hub / github.com/reduxjs/redux / test

Function test

test/applyMiddleware.spec.ts:30–35  ·  view source on GitHub ↗
(spyOnMethods: any)

Source from the content-addressed store, hash-verified

28
29 it('wraps dispatch method with middleware once', () => {
30 function test(spyOnMethods: any): Middleware {
31 return methods => {
32 spyOnMethods(methods)
33 return next => action => next(action)
34 }
35 }
36
37 const spy = vi.fn()
38 const store = applyMiddleware(test(spy), thunk)(createStore)(reducers.todos)

Callers 3

App.test.jsFile · 0.85
App.test.tsxFile · 0.85

Calls 1

nextFunction · 0.70

Tested by

no test coverage detected