25 + 5 Clock - Tests failing though I can see the functionality working

Hi Everyone

So, I’m working on the 25 + 5 Clock and the first few functionality tests (incrementing and decrementing break and session times). (Tests 2-5). Is it something with the reference to the elements?

However, I can see the elements doing what they’re supposed to be doing. Element ID seems to be ok, as per test requirements.

Am I missing something here? Please help!


Go back in and try using the timer without running the tests. Try incrementing and decrementing the session time and watch what happens to the break time. Try resetting the times after making some changes. There are a number of bugs with how values are being set/stored.

1 Like

Hey @melockwood94 , thanks for taking the time to check it out. You were right about the session/ break time bug. The break length was somehow dependent upon the session length. The reset button seemed to working alright, but maybe I was missing something else.

In any case, I have updated the CodePen with the latest version. It seems to be working better now, as all tests have now passed except for the last one, something with the audio file. I’m trying to solve that. The updated CodePen is here (Same link as above) .

Also, two things:
Many of the tests are labeled as slow (red tag). I assume it’s because I’m not using React, but just regular JS. Could that be it? In my code, I’m actually not using many functions that have to dynamically allocate memory (ie, not a lot of parsing functions, or functions that allocate arrays or strings). If you have any insight on why that could be, I’d be happy to learn.

Also, I can’t get the background gradient to stretch in full (Using Bootstrap). If you know anything about that, I’d be happy to hear.

Thank you!

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