From 100ce3cd053a1340fe813ccb170f4427a61af2ee Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Wed, 22 Jul 2015 19:28:54 +0300 Subject: [PATCH] composeMiddleware is an implementation detail of applyMiddleware --- src/index.js | 4 +--- test/utils/composeMiddleware.spec.js | 17 ----------------- 2 files changed, 1 insertion(+), 20 deletions(-) delete mode 100644 test/utils/composeMiddleware.spec.js diff --git a/src/index.js b/src/index.js index 06efcb70d1..0679d67aab 100644 --- a/src/index.js +++ b/src/index.js @@ -3,13 +3,11 @@ import compose from './utils/compose'; import combineReducers from './utils/combineReducers'; import bindActionCreators from './utils/bindActionCreators'; import applyMiddleware from './utils/applyMiddleware'; -import composeMiddleware from './utils/composeMiddleware'; export { createStore, compose, combineReducers, bindActionCreators, - applyMiddleware, - composeMiddleware + applyMiddleware }; diff --git a/test/utils/composeMiddleware.spec.js b/test/utils/composeMiddleware.spec.js deleted file mode 100644 index 8b5192faea..0000000000 --- a/test/utils/composeMiddleware.spec.js +++ /dev/null @@ -1,17 +0,0 @@ -import expect from 'expect'; -import { composeMiddleware } from '../../src'; - -describe('Utils', () => { - describe('composeMiddleware', () => { - it('should return combined middleware that executes from left to right', () => { - const a = () => next => action => next(action + 'a'); - const b = () => next => action => next(action + 'b'); - const c = () => next => action => next(action + 'c'); - const dispatch = action => action; - - expect(composeMiddleware(a, b, c)()(dispatch)('')).toBe('abc'); - expect(composeMiddleware(b, c, a)()(dispatch)('')).toBe('bca'); - expect(composeMiddleware(c, a, b)()(dispatch)('')).toBe('cab'); - }); - }); -});