25 + 5 Clock: test failures

Hi, I am stuck with 25 + 5 clock test failures, although visually it seems working fine. These are the failures:

Timer has not reached 00:00.
25 + 5 clock has started but time displayed is not changing : expected 0 to be above 0

I tried different methods like using accurate-interval package but the tests are still failing. I know this is a common issue faced by many learners and suspect this is a problem with the test cases. Nevertheless, I wish I could find a solution for this. Here’s my codepen solution: https://codepen.io/jayeliz92/pen/vYxxMQm

Hello,

I recently completed the 25 + 5 project and I also had issues with passing all the tests, while my app seemed to be working as it is expected.

What I suggest you do is to look at your code and how your projects responds to testing and then compare it to the provided example project. For example one difference that I found in the quick overview is that in your case, when you created the start_stop button you put your even listener on a span and not on the div that has the id="start-stop". If you look at the example project you will see that the event listener is on the div that has the id="start_stop". Go like this through your code using your browser inspector and compare it to the example project to see what else you can find (not having event listeners on the elements with proper IDs was in particularly the main cause of not passing the tests in my case).

After that when you run the tests on your app really take notice how your app responds to them. Run the tests on the example project as well and look at how that app responds to the tests and then compare what are the difference between your app and the example app. Compare does your app perform the same amount of beeps as the example, is the timer running in the same fashion and similar.

Checking my code with the inspector and comparing it to the example, together with comparing how the test cases run in the app, is how I managed to get all of the test cases to pass.

Good luck.

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