import { Map, notSetValue } from 'immutable'

import { CREDATE_COSTS } from '../../actions'

export default function costs (state = Map(), action) {
  switch (action.type) {
    case CREDATE_COSTS:
      if (state.get(action.category) === notSetValue) {
        return state.set(action.category, action.cost)
      } else {
        return state.set(action.category, action.cost + state.get(action.category))
      }
      break
    default:
      return state
  }
}

import { Map, notSetValue } from 'immutable'

import { CREDATE_COSTS } from '../../actions'

export default function costs (state = Map(), action) {
  switch (action.type) {
    case CREDATE_COSTS:
      if (state.get(action.category) === notSetValue) {
        return state.set(action.category, action.cost)
      }

      return state.set(action.category, action.cost + state.get(action.category))
    default:
      return state
  }
}

Remove else statement in switch statement
Remove else statement in switch statement

This allows the tests to reach any statements and reach 100% coverage.
