Pomodoro clock - cannot pass audio test

I’ve used react and redux to solve this challenge, but for some reason I cannot pass one audio test.


28/29 passed:

1. When a countdown reaches zero (NOTE: timer MUST reach 00:00), a sound indicating that time is up should play. This should utilize an HTML5

Timer has reached zero but audio is not playing while it should.: expected true to be false

Any ideas?

I haven’t done this challenge so I’m just speculating here. Your clock definitely goes down to 0, and I do hear the beeping, but the beeping doesn’t start until almost a second after it reaches 0. Maybe this delay is fooling the tests?

Did you figure it out? I am having the same issue in my project and am looking for answers. Just like yours, my timer appears to work and beep when I use it, but the test is failing. The only difference is that I ended up using Audio() since I couldn’t get the <audio> tag to work.

Hi, I was indeed able to solve it, though it was some time ago and I am not 100% sure how I did. I think the thing I changed was I added the ref attribute to my audio object

crated a ref in the constructor
this.audioBeep = React.createRef();

And then also postponed the timer change for 1 second, so when it his 0, it waits 1 second

          setTimeout(() => {
          }, 1000);