I’m having some trouble getting my Pomodoro clock to pass all tests in the test suite. It keeps failing on these three tests, with the resulting error message in bold below:
-
Test: When I click the element with the id of “reset”, any running timer should be stopped, the value within id=“break-length” should return to 5, the value within id=“session-length” should return to 25, and the element with id=“time-left” should reset to it’s default state.
Result: Pomodoro has paused but time continued elapsing -
Test: If the timer is running and I click the element with id=“start_stop”, the countdown should pause.
Result: Pomodoro has paused but time continued elapsing -
Test: The audio element with id=“beep” must be 1 second or longer.
Result: Audio element with id=“beep” is not at least 1 second long.: expected NaN to be above 1
I’m not sure why it is failing these three tests, because my Pomodoro clock seems to have all the required functionality. When I manually click the reset button and the start/stop button, it behaves as expected. The audio element I am using also has a duration > 1 second.
Does anyone see anything wrong with my code that could be causing the tests to fail?