25 + 5 Clock Tests Break From Slowness

Tell us what’s happening:
Whenever I try to test my 25 + 5 clock on codepen it’s really slow, sometimes so slow it will time out and not check tests that usually work do to time out, my tests on all the other projects are always fast like they should be.

I’m not sure if it’s the fact that it’s a clock that makes it slow but I know for sure tests should not break do to time out and work other times with the same lines of code

Don’t worry I understand that FreeCodeCamp runs on a limited group of volunteers and that the slowness may be non removable

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36

Challenge: Front End Development Libraries Projects - Build a 25 + 5 Clock

Link to the challenge:

It’s your code. The tests fiddle with the internal timers to make the code run faster. It seems like your code is running slower than it should with the accelerated timers. On starting the tests, I noticed that your time began as 25:0 and during the first countdown test, your session time actually became negative which should not be allowable by your code.

I would fix these issues and check for other places that need boundary checks. The slow time problem is almost always a problem with an interval, but the only problem I spotted was that you have a two second delay from start to time change because you don’t call your interval function when you set it so it doesn’t run immediately, only after 1 second.

thanks for help i’ll try to fix my code