Commit 24d7e8c2 authored by Ryan Diehl's avatar Ryan Diehl

Merge branch 'feature/rx' into 'develop'

refactor: removes createReducer

See merge request !28
parents 2b0e0ceb 82b9d2f3
Pipeline #101032 passed with stages
in 5 minutes and 2 seconds
export { httpRetryBackoff, HttpRetryBackoffConfig } from './lib/http-backoff';
export { createReducer } from './lib/reducer-utils';
import { createReducer } from '..';
describe('reducer utils', () => {
describe('createReducer', () => {
it('should create reducer correctly', () => {
const result = createReducer({}, {});
expect(result instanceof Function).toBe(true);
expect(result({ s: 's' }, {})).toEqual({ s: 's' });
});
});
});
/**
* @deprecated use ngrx reducer creators instead
*
*/
export function createReducer(iState, handlers): (state, action) => any {
return (state = iState, action) => {
return handlers.hasOwnProperty(action.type) ? handlers[action.type](state, action) : state;
};
}
......@@ -6,7 +6,7 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"test": "ng test --passWithNoTests",
"lint": "ng lint",
"e2e": "ng e2e",
"affected:apps": "nx affected:apps",
......
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