Pomodoro Clock tests not passing although app is functional

Hey everyone, I have constructed a pomodoro clock although it is fully functional at this point, I still cannot pass 7 of the 29 tests. One of them is the reset test. When I press the reset button , everything appears to function just fine. But the test says “Error: Script error. (:0)” . Another place it appears to wrongfully failing the tests is in the test that sees if there is a mm:ss format and decrease by 1 every 1000 miliseconds,that is what my timer does from my knowledge but I get the error “TypeError: Cannot read property ‘1’ of null”. I get the same error for the pause test although from what I see the stop_play button works just fine. If you could run the tests on your own computer you could see the problems I am running into.

My codepen

thanks in advance!

Not sure if it has anything to do with why some of the tests are not passing, but your timer is not working correctly. Let’s say I set the Session length for 1:00 and the Break length for 1:00 . Once I click Start, 2 seconds go by before the Session time changes from 01:00 to 00:59. Also, once the Session time gets to 00:00, one second later your clock should read 00:59 and not 1:00 (which yours does). This is adding one additional second to the break length each time.

1 Like

Thanks for catching that, I didn’t even notice. Although my tests are still not passing that should, the clock is definitely running better already as far as I can tell. I had initialized the minutes and seconds value after the subtraction of total seconds. I don’t know what else could be keeping those tests from passing though. Unless that countdown is still malfunctioning and I can’t tell lol

I will be offline for a couple of hours, but when I get back on, I will try to take a look at your actual code to see what might be the problem if you have not already figured out the problem by then.

FYI - 8 out of 10 Pomodoro Clock projects I have reviewed have had the same issue with the timer being off by a second.

1 Like

Alright, thanks already for your assistance

I don’t mean to pester but were you ever able to check the app again? The link is the same as before https://codepen.io/DannyHz/pen/aKyxWv?editors=1010

I have similar problem with my project: https://codepen.io/wawraf/full/oyoMdm/.

Could you please check it - i think that everything is OK, but fail the test.

Hello! I’m also working on the Pomodoro Clock project and having trouble getting mine to pass all of the tests. My app seems to be functional, but I must be missing something. I would love to get any feedback. Thank you for your help.

Here is my project: