[Do not mutate state!]
.");'
- text: ''
testString: 'assert(typeof addToDo === "function" && typeof immutableReducer === "function", "addToDo
and immutableReducer
both should be functions.");'
- text: ''
testString: 'assert((function() { const initialState = store.getState(); const isFrozen = DeepFreeze(initialState); store.dispatch(addToDo("__TEST__TO__DO__")); const finalState = store.getState(); const expectedState = [ "Do not mutate state!", "__TEST__TO__DO__" ]; return( isFrozen && DeepEqual(finalState, expectedState)); })(), "Dispatching an action of type ADD_TO_DO
on the Redux store should add a todo
item and should NOT mutate state.");'
- text: ''
testString: 'getUserInput => assert(getUserInput("index").includes("...state"), "The spread operator should be used to return new state.");'
```