Skip to content

Commit 5f7f99a

Browse files
fix type error in tests
1 parent 39e72cb commit 5f7f99a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

static/js/util/redux_test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,12 @@ describe('redux helpers', () => {
6868
}));
6969
let actionList = [asyncActionCreator];
7070
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+
7277

7378
let actions;
7479
beforeEach(() => {
@@ -84,7 +89,6 @@ describe('redux helpers', () => {
8489

8590
it('should return an array of asyncActionCreators', () => {
8691
let [ { asyncActionCreator } ] = actions;
87-
// (args) => dispatch(
8892
let dispatched = asyncActionCreator(2);
8993
assert.isFulfilled(dispatched);
9094
assert(dispatchSpy.calledWith({

0 commit comments

Comments
 (0)