I’m currently building the pomodoro clock project using React. From the outside, it seems like my clock works fine. Unfortunately, only 25/29 test cases pass. 3/4 failing test cases are due to:
cannot read property ‘1’ of null
-
- When a session countdown reaches zero (NOTE: timer MUST reach 00:00), and a new countdown begins, the element with the id of “timer-label” should display a string indicating a break has begun. – failed: cannot read property ‘1’ of null.
-
- When a session countdown reaches zero (NOTE: timer MUST reach 00:00), a new break countdown should begin, counting down from the value currently displayed in the id=“break-length” element. – failed: cannot read property ‘1’ of null.
-
- When a break countdown reaches zero (NOTE: timer MUST reach 00:00), a new session countdown should begin, counting down from the value currently displayed in the id=“session-length” element. – failed: cannot read property ‘1’ of null.
I’m also a little confused on why I’m failing the final audio test when I created methods to pause the audio and set the currentTime to 0 whenever the user clicks reset, but I think I would be able to eventually this issue on my own.
-
- The audio element with id of “beep” must stop playing and be rewound to the beginning when the element with the id of “reset” is clicked. – failed: Audio element was not stopped when reset was clicked.: expected false to be true
I’m really confused by why these tests are failing, especially the first three. Any ideas? Thank you so much!
Live demo: React App