25 + 5 Clock works but does not pass #Timer tests 9 to 15

Tell us what’s happening:

My solution appears to be fully functional but does not pass any tests where the timer must reach 00:00. As can be seen in my short video clip, the timer does display 00:00 before switching to ‘break’ (or back to ‘session’ at the end of ‘break’). From a user experience perspective, whatever is happening in the background appears to be irrelevant, but I’d like to understand what’s happening, and, if possible, edit the code to pass the tests, without having to completely overhaul it.


What I’ve tried
1.) After learning about how the setInterval method is not precise, I used the custom interval function from the fCC solution but it made no difference in the automated tests.
2.) After studying the code in the fCC solution, I noticed the timer in state hits -1 when the display is 00:00. My code does not allow for this because I check state at 0.

Your code so far


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:88.0) Gecko/20100101 Firefox/88.0.

Challenge: Build a 25 + 5 Clock

Link to the challenge:

Found out the reason I was failing 8 out of the 9 tests was because of a misplaced id="start_stop" on the enclosing <div> instead of the nested <i> tag. See below the updated code and linked farther below the post where I found the solution.

I am still failing test #9. I will keep reading through the forum as I am now hopeful it be something small like this.

<div className="col-1 text-center">
         ? <i id="start_stop" className="fas fa-pause" onClick={this.startStop}></i> 
         : <i id="start_stop" className="fas fa-play" onClick={this.startStop}></i>


All tests passed in Chrome but only 28 out of 29 in Firefox. Submitting as is!

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