25 + 5 timer not passing tests due to not reaching "00:00"

So I have tried everything and more. I have checked the literal string for “00:00” as some people found that they had “0:00” so it was failing. That isn’t my problem. My timer does hit 00:00 as when I stop the timer instead of starting the break the timer it says 00:00. What am I missing here at first, it was the mutating states, which I have completely stopped and fixed. So my state is working fine. But now it is not passing the tests even though it functions the exact way that the tests want it to function.

Every error comes out as:

Timer has not reached 00:00.
Error: Timer has not reached 00:00.
    at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:584:153156

If my timer is reaching 00:00 what is the problem?

Any help is much appreciated as countless days have been spent on this!

The link to my project: https://codepen.io/brad2007/pen/abEeyNx?editors=0010

your 25+5 clock seems to be running more than once probably infinitely!! which should be completed after running once (session + break) but currently it doesn’t!!

I don’t know why you have functions inside your setState? Don’t put setInterval inside setState and don’t wrap your method calls inside a function inside setState.

I’d suggest going through a proper course on React. If you still want to use classes you may have to pick an older course or you can just skip to function components and hooks.

In the example it does the same thing…

yeah, you’re right, it’s been a while since i done that assignment, perhaps you should look into what lasjorg is suggesting, thanks :slight_smile:

Thanks for trying to help I will look into it.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.