diff --git a/src/utils/wrapActionCreators.js b/src/utils/wrapActionCreators.js deleted file mode 100644 index 1bcea70c9..000000000 --- a/src/utils/wrapActionCreators.js +++ /dev/null @@ -1,5 +0,0 @@ -import bindActionCreators from './bindActionCreators' - -export default function wrapActionCreators(actionCreators) { - return (dispatch) => bindActionCreators(actionCreators, dispatch) -} diff --git a/test/utils/wrapActionCreators.spec.js b/test/utils/wrapActionCreators.spec.js deleted file mode 100644 index 578030c74..000000000 --- a/test/utils/wrapActionCreators.spec.js +++ /dev/null @@ -1,28 +0,0 @@ -import wrapActionCreators from '../../src/utils/wrapActionCreators' - -describe('Utils', () => { - describe('wrapActionCreators', () => { - it('should return a function that wraps argument in a call to bindActionCreators', () => { - function dispatch(action) { - return { - dispatched: action, - } - } - - const actionResult = { an: 'action' } - - const actionCreators = { - action: () => actionResult, - } - - const wrapped = wrapActionCreators(actionCreators) - expect(wrapped).toBeInstanceOf(Function) - expect(() => wrapped(dispatch)).not.toThrow() - expect(() => wrapped().action()).toThrow() - - const bound = wrapped(dispatch) - expect(bound.action).not.toThrow() - expect(bound.action().dispatched).toBe(actionResult) - }) - }) -})