Pomodoro Clock: tests fail: Timer has not reached 00:00 But my timer reach 00:00

this is my codepen
https://codepen.io/AbderrahmaneMustapha/pen/rNBjXVo

i need help to fix this

I think the problem is that the timer isn’t showing 00:00, but rather it goes straight to 05:00 right after 00:01.

1 Like

the timer is showing 00 : 00 , i did a console.log(timer) and i saw 00:00

Make sure the spaces around the “:” are not the problem

Edit: nevermind, sorry. I replied to the comment but I hadn’t check the pen yet

1 Like

The timer does hit 00:00 and you can console.log it, but you’re immediately switching to the next timer as soon as it hits, so you don’t see it on the page.

1 Like

and do you have any idea how to fix this
!!!

Instead of checking the decremented timer, check its previous value (before subtracting the one second). Only trigger the timer switching when the previous value is 00:00

1 Like

Maybe still wait another 1 second like the rest of the ticks before switching to the break/study session

thank you preoblem fixed

This was exactly my problem. 00:01 to 5:00. Thanks!