25 + 5 Clock Project works, but doesn't pass

Tell us what’s happening:
It’s failing tests 9, 10, and 11.

9. If the timer is running, the element with the id of "time-left" should display the remaining time in mm:ss format (decrementing by a value of 1 and updating the display every 1000ms).
	25 + 5 clock has started but time displayed is not changing : expected 0 to be above 0
	
10. If the timer is running and I click the element with id="start_stop", the countdown should pause.
	25 + 5 has started but time displayed is not changing: expected '00' to not equal '00'
    
11. If the timer is paused and I click the element with id="start_stop", the countdown should resume running from the point at which it was paused.
	25 + 5 clock has started but time displayed is not changing: expected '00' to not equal '00'

Is there any obvious reason as to why it’s not working? I’ve been stuck for days and I really don’t want to rewrite the entire thing.

I wrote this in VSCode so the buttons and beep I’m using have been replaced with text and the beep from the example program, as I have no place to host that stuff right now. Regardless, it still works fine. Just doesn’t pass.

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36.

Challenge: Build a 25 + 5 Clock

Link to the challenge:

Just from testing your buttons - the clock starts too late. There’s a one second delay, so for the test it looks like the clock isn’t moving.

2 Likes

what helped me is dividing the period when seconds elapsed===00 into two parts using setInterval for 1000ms and setTimeout for 500ms

1 Like

That’s exactly what the issue was, it passes now. Thank you very much.

That one second delay has repeatedly been an issue with this challenge - awesome you’ve solved it now :love_you_gesture: