diff --git a/spec/edge.spec.ts b/spec/edge.spec.ts index de15906..e909457 100644 --- a/spec/edge.spec.ts +++ b/spec/edge.spec.ts @@ -48,8 +48,8 @@ describe('ngRx Store', () => { let todosCountNextCount = 0; store.select('todos').subscribe((todos: any[]) => { - todosNextCount++ - store.dispatch({ type: 'SET_COUNT', payload: todos.length }) + todosNextCount++; + store.dispatch({ type: 'SET_COUNT', payload: todos.length }); }); store.select('todoCount').subscribe(count => { diff --git a/spec/fixtures/counter.ts b/spec/fixtures/counter.ts index 814b085..aa1e922 100644 --- a/spec/fixtures/counter.ts +++ b/spec/fixtures/counter.ts @@ -2,7 +2,7 @@ export const INCREMENT = 'INCREMENT'; export const DECREMENT = 'DECREMENT'; export const RESET = 'RESET'; -export function counterReducer(state = 0, action){ +export function counterReducer(state = 0, action) { switch (action.type) { case INCREMENT: return state + 1; diff --git a/spec/fixtures/edge_todos.ts b/spec/fixtures/edge_todos.ts index 2030734..a61f28b 100644 --- a/spec/fixtures/edge_todos.ts +++ b/spec/fixtures/edge_todos.ts @@ -5,20 +5,20 @@ const todo = (state, action) => { id: action.payload.id, text: action.payload.text, completed: false - } + }; case 'TOGGLE_TODO': if (state.id !== action.id) { - return state + return state; } return Object.assign({}, state, { completed: !state.completed - }) + }); default: - return state + return state; } -} +}; export const todos = (state = [], action) => { switch (action.type) { @@ -26,21 +26,21 @@ export const todos = (state = [], action) => { return [ ...state, todo(undefined, action) - ] + ]; case 'TOGGLE_TODO': return state.map(t => todo(t, action) - ) + ); default: - return state + return state; } -} +}; export const todoCount = (state = 0, action) => { - switch(action.type){ + switch (action.type) { case 'SET_COUNT': return action.payload; default: return state; } -} +}; diff --git a/src/ng2.ts b/src/ng2.ts index 2932018..64f6c6a 100644 --- a/src/ng2.ts +++ b/src/ng2.ts @@ -57,7 +57,7 @@ export function provideStore(_reducer: any, _initialState?: any): any[] { @NgModule({}) export class StoreModule { - static provideStore(_reducer: any, _initialState?:any): ModuleWithProviders { + static provideStore(_reducer: any, _initialState?: any): ModuleWithProviders { return { ngModule: StoreModule, providers: provideStore(_reducer, _initialState)