Skip to content

Commit

Permalink
Deletes no-longer-valid applyMiddleware test.
Browse files Browse the repository at this point in the history
Behavior has been replaced with the "it warns when dispatching during middleware setup" test in the 'next' branch.
  • Loading branch information
jimbolla committed Jan 6, 2017
1 parent b4f231d commit 8029f8e
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions test/applyMiddleware.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,21 +105,4 @@ describe('applyMiddleware', () => {
})
})

it('keeps unwrapped dispatch available while middleware is initializing', () => {
// This is documenting the existing behavior in Redux 3.x.
// We plan to forbid this in Redux 4.x.

function earlyDispatch({ dispatch }) {
dispatch(addTodo('Hello'))
return () => action => action
}

const store = createStore(reducers.todos, applyMiddleware(earlyDispatch))
expect(store.getState()).toEqual([
{
id: 1,
text: 'Hello'
}
])
})
})

0 comments on commit 8029f8e

Please sign in to comment.