Testing Reducers

We'll test Redux reducers in our Weather app that's built with React and Redux.

We'll cover the following...

The reducer is, again, a pure function! It’s quite easy to see what we need to validate actually, basically every case of our switch needs to have a test:

export default function mainReducer(state = initialState, action) {
  switch (action.type) {
    case 'CHANGE_LOCATION':
      return
...