(state, action)
| 36 | const initialState = {count: 0}; |
| 37 | |
| 38 | function reducer(state, action) { |
| 39 | switch (action.type) { |
| 40 | case 'reset': |
| 41 | return initialState; |
| 42 | case 'increment': |
| 43 | return {count: state.count + 1}; |
| 44 | case 'decrement': |
| 45 | return {count: state.count - 1}; |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | const staticInfo = [ |
| 50 | {type: 'increment', text: '+'}, |
no outgoing calls
no test coverage detected