diff --git a/src/index.js b/src/index.js index 56c523f..9c7b9d1 100644 --- a/src/index.js +++ b/src/index.js @@ -38,7 +38,7 @@ export default function configureStore (middlewares = []) { actions.push(action) for (let i = 0; i < listeners.length; i++) { - listeners[i]() + listeners[i](action) } return action diff --git a/test/index.js b/test/index.js index 2e60747..4e616ce 100644 --- a/test/index.js +++ b/test/index.js @@ -108,8 +108,9 @@ describe('redux-mock-store', () => { const store = mockStore() const action = { type: 'ADD_ITEM' } - store.subscribe(() => { + store.subscribe((a) => { expect(store.getActions()[0]).toEqual(action) + expect(action).toEqual(a) done() }) store.dispatch(action)