25+5 Timer - Tests failing but program is working

Tell us what’s happening:
I built the 25 + 5 timer and all the functionality is there and working fine when I am using it, however the automated tests are failing. How can I fix it?

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36

Challenge: Build a 25 + 5 Clock

Link to the challenge:

Anyone? Any pointers on how to debug the tests would also be helpful…

Hi

When I run the tests on your code, they seem to be complaining about two things:

  1. the countdown not reaching zero
  2. the audio element not playing

If I set a session to 1 minute and a break to 1 minute, the timer doesn’t seem to ever display 00:00.
For example, it goes from a session time of 00:01 directly to a break time of 00:59.
Notice that the instructions say:

NOTE: timer MUST reach 00:00

So I think that’s something you could look at.

For the audio element (user stories 26, 27, 28), I couldn’t see an audio element in your code?
And I didn’t hear any beep/alarm when I ran your code.

But it’s late here so it’s entirely possible that I’ve missed something there.

That was it! Thanks!

You are also right about the audio, I just didn’t add the functionality, as it was considerably easier.