25+5 clock not passing, but seems to be working okay

I’ve been trying to do this project using and I’ve managed to pass all but two of the test, I’m not sure why the last two aren’t passing but I’m just guessing that it may have something to do with the refreshing of the states not lining up and changing exactly when it’s called?

The user stories not passing are:

User Story #24: When a break 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 session has begun.

User Story #25: When a break countdown reaches zero (NOTE: timer MUST reach 00:00), a new session countdown should begin, counting down from the value currently displayed in the id=“session-length”

I’d really appreciate some help on this one.

Hosted here

Code here


Hi @melvinn721

As the error states, Your timer is not going down to 00:00 when the session/break ends.
I could see numbers going down until 00:01 then immediately changing the session and the counter is reset to the next session/break.
You should make sure the countdown reaches 00:00.
Hint: > and >= has a huge difference.

Another issue I found in your code is that when you keep on decreasing the session timer, the time-left goes down to 00:00 while session-length stays 1.

1 Like

Thank you so much. You were right about both errors. I managed to fix them and it passed the tests.
Now onto styling and then I can finish this certification!
Thank you again and happy new year!


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.