25 + 5 timer troubles with codepen tests

Hey guys, I’m having a hard time getting my 25 + 5 timer to pass a few tests. It currently does everything the description requests but it doesn’t pass these tests:

10. If the timer is running and I click the element with id=“start_stop”, the countdown should pause.

reason:
25 + 5 has started but time displayed is not changing: expected ‘00’ to not equal ‘00’

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.

reason:
Timer has not reached 00:00.

14. 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.

reason:
Timer has not reached 00:00.

1. When a countdown reaches zero (NOTE: timer MUST reach 00:00), a sound indicating that time is up should play. This should utilize an HTML5

reason:
Timer has not reached 00:00.

With all of my testing my timer reaches 00:00 but codepen isn’t happy for some reason. I tried changing my ‘time-left’ element from h2 to p to div etc. which has helped another person in this forum but it didn’t work for me. If anyone has suggestions I greatly appreciate it. Thank you.

Here’s my code:

Sorry for the lack of styling, I don’t have it included since I’m just trying to fix these problems. Also, default time for session and break are both set to 3 seconds to expedite seeing the timer actually reach 00:00

Update - it’s fixed! I didn’t update one of the properties in the state on reset!

Finished product, for now…

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