Pomodoro Clock - Need Help with last 3 tests

Hi all, I’ve basically finished the clock. It does do what it is supposed to do manually. Only problem is in the tests. I’m failing on 3 tests but if I change the timeout on the timer to 10 ms (line 81) then I pass all the tests. Strange i’m probably missing somethin simple.

Project link https://codepen.io/Jonsey/pen/QRGRwP

Any help greatly appreciated

So in your runTimer(...) function, you update the display, then decrement the timer. So the timer is a second out of sync with the display. Not saying that’s the problem, but it could be, given that the detail of all three messages is exactly the same, and is indicating that something along those lines seems to be the culprit.

Try moving the updating of the display to right after the actual timer values have been changed.

Thanks for your reply. I’ve made the change that you mentioned and those 3 tests now pass. Unfortunately i now fail two different tests. 13 and 15 which I am looking into. No success as yet.

1 Like