Build a 25 + 5 Clock: time-left is not formatted correctly: expected ‘00’ to equal ‘25’

Tell us what’s happening:
My timer does reach 00:00 for both the session and the break, and yet I get this error…

Your code so far

Your browser information:

User Agent is: Chrome/104.0.5112.102

Challenge: Front End Development Libraries Projects - Build a 25 + 5 Clock

Link to the challenge:

I notice that you have three similar topics open at the moment. The other two are Build a 25 + 5 Clock: Increment/Decrement Test Timeout
and
Build a 25 + 5 Clock: Bad time string - #2 by hbar1st

Do you need all these(are you asking three different questions)?
if not, please delete the one you no longer need.

@jedidjavdwalt Please do not open similar questions for the same project. It causes confusion for users willing to help. Keep all your related questions together in a single topic. Thank you.

I would start changing the time setters and make sure they can’t go below 1 or above 60 (don’t let them circle back around).

I’d also suggest you make your setState conditionals more explicit and not rely on return statements. Even if this doesn’t change anything it just makes it much easier to read and reason about.

I didn’t test the code or look for issues but make sure you can see the output and it isn’t covered up by the test when running them.

Thank you, will do that in the future. I thought it made more sense to separate them out since they are related to 3 different issues (although, all in the same project).

Thank you, I’ll have a look and see where that gets me.

So I have managed to resolve all issues, except for test #8. I’m still getting the message: “time-left is not formatted correctly: expected ‘00’ to equal ‘25’”

SOLVED!

The initial issue with reaching ‘00:00’ was due to having a   included, so the value was '00:00 '.

The timeouts in the increment/decrement was solved by not allowing the break and session to loop back around once hitting 0/60.

“time-left is not formatted correctly: expected ‘00’ to equal ‘25’” was solved by not resetting the time left to 0 on reset/increment or decrement a stopped timer/initial value but rather to the session length. This is a requirement that could be more clearly explained in the instructions, I believe.