Open heron2014 opened 8 years ago
Third party library that helps to test reducers.
npm install deep-freeze-strict --save-dev
Library doesn't let you update the properties on frozen object.
If you try to modify for example action object by:
export var searchTextReducer = (state = '', action) => { action.something =5; // -<------ here I am deliberately updating the object switch (action.type) { case 'SET_SEARCH_TEXT': return action.searchText; default: return state; }; };
// var df = require('deep-freeze-strict'); var res = reducers.searchTextReducer(df(''), df(action));
I got this error:
Third party library that helps to test reducers.
npm install deep-freeze-strict --save-dev
Library doesn't let you update the properties on frozen object.
If you try to modify for example action object by:
I got this error: