I need the help of some expert eyes and minds to solve the code errors that I am getting below. Much appreciated, thanks!!!
My project link:
These are 2 User Story Tests that are failing at the moment:-
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
The audio element with id=“beep” must be 1 second or longer.
—Timeout of 2000ms exceeded. For async tests and hooks, ensure “done()” is called; if returning a Promise, ensure it resolves.
Error: Timeout of 2000ms exceeded. For async tests and hooks, ensure “done()” is called; if returning a Promise, ensure it resolves.
Well, I don’t think the user stories are simply failing - you haven’t implemented the audio yet. When I run your code and the audio tries to run, I hear nothing and I get:
Uncaught (in promise) DOMException: The element has no supported sources.
in the browser console.
I think it’s a little weird to have an html element (your audio element) outside the React code. I would expect that to be in the JSX and use a ref to access it. But, ultimately I think your problem is the src you are using for the sound file - I was able to use a different one and get all the tests to pass.