useReducer
Basic example showing how to test the useReducer hook.
The most important thing is that we aren't testing the reducer directly - it's an
implementation detail of the component! Instead we are testing the component interface.
The component we are testing changes some text depending on an isConfirmed state.
We are testing to see if we get the correct output in our JSX based on the reducer state.