Hey, everyone!
First time posting here, I hope i’m not doing something wrong.
So, I’m doing the freecodecamp challenge of building a 25+5 clock. And I’m getting these error messages that I can’t even know what the real problema is, like:
- 25 + 5 clock has started but time displayed is not changing : expected 0 to be above 0
- AssertionError: 25 + 5 has started but time displayed is not changing: expected ‘00’ to not equal ‘00’
- Timer has not reached 00:00.
I already saw other responses to similar problems, but the issues people where having seems different. As I’ll explain bellow
My clock is changing the display, and my timer is reaching 00:00. It is also displaying the start number of the clock when it changes from a session clock to a break clock. And pausing and restarting, as it should.
My thoughts on this is that maybe my clock is displaying things correctly, but not in the time that the automated test expect it, causing the errors. And what is weird is that if I change the time in which I call my function that manages time to 100 ms instead of 1000 ms (I did that to run my own tests) I pass all the tests, but my clock runs faster. I already tried changing the clock to update every 100 ms but it didn’t work.
I’m also considering changing my time management from a stateful class to a function, maybe it will have a quicker response? (IDK)
So, my codepen is here: My 25+5 clock
I didn’t started styling it
Any help will be greatly appreciated! 
EDIT: I explain bellow how I managed to fix, hopefully it would be helpful to somebody.


