File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,12 @@ describe('redux helpers', () => {
68
68
} ) ) ;
69
69
let actionList = [ asyncActionCreator ] ;
70
70
let dispatchSpy = sinon . stub ( ) . returns ( Promise . resolve ( ) ) ;
71
- let asyncDispatch = createdActionFunc => createdActionFunc ( dispatchSpy ) ;
71
+ let asyncDispatch = ( createdActionFunc ) => {
72
+ if ( typeof ( createdActionFunc ) === 'function' ) {
73
+ return createdActionFunc ( dispatchSpy ) ;
74
+ }
75
+ } ;
76
+
72
77
73
78
let actions ;
74
79
beforeEach ( ( ) => {
@@ -84,7 +89,6 @@ describe('redux helpers', () => {
84
89
85
90
it ( 'should return an array of asyncActionCreators' , ( ) => {
86
91
let [ { asyncActionCreator } ] = actions ;
87
- // (args) => dispatch(
88
92
let dispatched = asyncActionCreator ( 2 ) ;
89
93
assert . isFulfilled ( dispatched ) ;
90
94
assert ( dispatchSpy . calledWith ( {
You can’t perform that action at this time.
0 commit comments