25+5 clock last failing test

Hello everyone, I’m on the last challenge for frontend librairies, namely the “Build a 25 + 5 clock”.

The 8th test never seems to pass. I have tried a lot of thing and I can’t understand in which case the error below would occur.
image
I’ve seen similar topic but the solutions didn’t work.
I’m really lost here and i do not know where this : “time-left is not formatted correctly: expected ‘25’ to equal ‘60’” comes from.

Here’s my codepen:

https://codepen.io/Makusu-dev/pen/mydBvdL?editors=1011

it looks like the test may be trying to set a 60 minutes timer?

If I set a session time, I can see the timer updating accordingly. But if I then run the clock, reset and now try setting the session time again, it does not update the timer. It does start at the correct time when you start the clock, but not until it is started.

1 Like

It looks like the test is failing because your timer might be showing the wrong starting time when the session begins. The test expects it to show “25:00”, but for some reason, it’s seeing something like “60:00” instead. This usually happens when the session length isn’t being converted correctly into seconds, or when the timer display isn’t formatting the time properly. I’d suggest double-checking how you’re setting the initial time and making sure it’s showing minutes and seconds in the “MM:SS” format, with leading zeros if needed (like “05:00” instead of “5:0”). That should help get the test to pass.

1 Like

Thanks for the feedback. Funny thing because I had the same thought ass you and I had begun to implement a solution: Updating the Time-left display directly when the session-length is beeing incremented or decremented (While checking if this is before the first start). For some reason the tests had kept failing, but has I came back today it passed all the tests? Still not sure at what point the initial fail was as from my perspective the timer was allways updating.