Pomodoro Clock expected 'Session' to not equal 'Session'

My Pomodoro clock is still failing one user story (#22) but observing it in action it seems to be functioning fine.

#12. When a session countdown reaches zero (NOTE: timer MUST reach 00:00), and a new countdown begins, the element with the id of “timer-label” should display a string indicating a break has begun.

Timer has reached zero but didn’t switch to Break time: expected ‘Session’ to not equal ‘Session’


In the handleClick method at if (n === "reset") you need to set the value of the session property in this.setState. I’m actually surprised that test #6 passes because the initial value of session_length is supposed to equal 25, but the constructor sets it to 1. A good way to avoid this bug is to make an initialState constant outside the component and then use that constant in both the constructor and the reset function.

Thanks! That worked. How did you ever find that?
Anyway this means that my Front End Libraries certification is done!!

Congratulations! I read over the code several times and couldn’t see it. I started refactoring to try to make it cleaner and when I introduced a constant for initialState I saw it.