Commit ac9bf46e authored by Robert Knight's avatar Robert Knight

Remove an unhelpfully named variable

parent 6ec684f9
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
import { createStore, createStoreModule } from '../create-store'; import { createStore, createStoreModule } from '../create-store';
const A = 0;
function initialState(value = 0) { function initialState(value = 0) {
return { count: value }; return { count: value };
} }
...@@ -169,20 +167,20 @@ describe('createStore', () => { ...@@ -169,20 +167,20 @@ describe('createStore', () => {
it('adds selectors as methods to the store', () => { it('adds selectors as methods to the store', () => {
const store = counterStore(); const store = counterStore();
store.dispatch(counterModules[A].actionCreators.incrementA(5)); store.dispatch(counterModules[0].actionCreators.incrementA(5));
assert.equal(store.getCountA(), 5); assert.equal(store.getCountA(), 5);
}); });
it('adds root selectors as methods to the store', () => { it('adds root selectors as methods to the store', () => {
const store = counterStore(); const store = counterStore();
store.dispatch(counterModules[A].actionCreators.incrementA(5)); store.dispatch(counterModules[0].actionCreators.incrementA(5));
assert.equal(store.getCountAFromRoot(), 5); assert.equal(store.getCountAFromRoot(), 5);
}); });
it('applies `thunk` middleware by default', () => { it('applies `thunk` middleware by default', () => {
const store = counterStore(); const store = counterStore();
const doubleAction = (dispatch, getState) => { const doubleAction = (dispatch, getState) => {
dispatch(counterModules[A].actionCreators.incrementA(getState().a.count)); dispatch(counterModules[0].actionCreators.incrementA(getState().a.count));
}; };
store.incrementA(5); store.incrementA(5);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment