Build a Pomodoro Clock - Test Suite errors

Build a Pomodoro Clock - Test Suite errors
0

#1

Tell us what’s happening:

Although manually testing, the functionality seems to work as required, I am getting errors with the Test Suite.

The errors are Timeout elapsed or it cannot find the property instead of the intended output if the functionality went wrong so I am thinking for some reason the Test Suite isn’t working properly for my code. Are these bugs or do I need to rewrite my code to pass the tests?

#Pomodoro Clock tests

* passes: *19*
 * failures: *10*
 * duration: *30.43*

* # #Technology Stack

  * ## 1. You can use any mix of HTML, JavaScript, CSS, Bootstrap, SASS, React, Redux, and jQuery to complete this project. You should use a frontend framework (like React for example) because this section is about learning frontend frameworks. Additional technologies not listed above are not recommended and using them is at your own risk. We are looking at supporting other frontend frameworks like Angular and Vue, but they are not currently supported. We will accept and try to fix all issue reports that use the suggested technology stack for this project. Happy coding!
* # #Content

  * ## 1. I can see an element with id="break-label" that contains a string (e.g. “Break Length”).

  * ## 2. I can see an element with id="session-label" that contains a string (e.g. "Session Length”).

  * ## 3. I can see two clickable elements with corresponding IDs: id="break-decrement" and id="session-decrement".

  * ## 4. I can see two clickable elements with corresponding IDs: id="break-increment" and id="session-increment".

  * ## 5. I can see an element, with corresponding id="break-length", which by default (on load) displays a value of 5.

  * ## 6. I can see an element, with corresponding id="session-length", which by default displays a value of 25.

  * ## 7. I can see an element, with corresponding id="timer-label", that contains a string indicating a session is initialized (e.g. "Session").

  * ## 8. I can see an element with corresponding id="time-left". NOTE: Paused or running, the value in this field should always be displayed in mm:ss format (i.e. 25:00).

  * ## 9. I can see a clickable element with corresponding id="start_stop".

  * ## 10. I can see a clickable element with corresponding id="reset".
* # #Timer

  * ## 1. 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.

**Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. at o.f._timeoutError (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:32523) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:30654**

  * ## 2. When I click the element with the id of "break-decrement", the value within id="break-length" decrements by a value of 1, and I can see the updated value.

  * ## 3. When I click the element with the id of "break-increment", the value within id="break-length" increments by a value of 1, and I can see the updated value.

  * ## 4. When I click the element with the id of "session-decrement", the value within id="session-length" decrements by a value of 1, and I can see the updated value.

  * ## 5. When I click the element with the id of "session-increment", the value within id="session-length" increments by a value of 1, and I can see the updated value.

  * ## 6. I should not be able to set a session or break length to <= 0.

  * ## 7. I should not be able to set a session or break length to > 60.40ms

  * ## 8. When I first click the element with id="start_stop", the timer should begin running from the value currently displayed in id="session-length", even if the value has been incremented or decremented from the original value of 25.

**Cannot read property '1' of null TypeError: Cannot read property '1' of null at c (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:154:264234) at r.<anonymous> (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:154:271716) at c (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:31608) at o.f.run (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:31544) at m.runTest (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:37114) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:37976 at s (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:36426) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:36495 at o (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:35901) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:36313**

  * ## 9. If the timer is running, the element with the id of "time-left" should display the remaining time in mm:ss format (decrementing by a value of 1 and updating the display every 1000ms).

**Cannot read property '1' of null TypeError: Cannot read property '1' of null at h (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:154:264377) at r.<anonymous> (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:154:272099) at c (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:31608) at o.f.run (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:31544) at m.runTest (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:37114) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:37976 at s (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:36426) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:36495 at o (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:35901) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:36313**

  * ## 10. If the timer is running and I click the element with id="start_stop", the countdown should pause.

**Cannot read property '1' of null TypeError: Cannot read property '1' of null at h (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:154:264377) at r.<anonymous> (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:154:272524) at c (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:31608) at o.f.run (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:31544) at m.runTest (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:37114) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:37976 at s (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:36426) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:36495 at o (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:35901) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:36313**

  * ## 11. If the timer is paused and I click the element with id="start_stop", the countdown should resume running from the point at which it was paused.

**Cannot read property '1' of null TypeError: Cannot read property '1' of null at h (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:154:264377) at r.<anonymous> (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:154:273189) at c (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:31608) at o.f.run (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:31544) at m.runTest (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:37114) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:37976 at s (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:36426) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:36495 at o (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:35901) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:36313**

  * ## 12. 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.

**Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. at o.f._timeoutError (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:32523) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:30654**

  * ## 13. 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.

**Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. at o.f._timeoutError (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:32523) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:30654**

  * ## 14. When a break 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 session has begun.

**Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. at o.f._timeoutError (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:32523) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:30654**

  * ## 15. 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.

**Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. at o.f._timeoutError (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:32523) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:30654**
*** # #Audio**

  * ## 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 <audio> tag and have a corresponding id="beep".

**Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. at o.f._timeoutError (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:32523) at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:159:30654**

  * ## 2. The audio element with id="beep" must be 1 second or longer.

  * ## 3. 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.

Close

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/front-end-libraries-projects/build-a-pomodoro-clock


#2

As I did this challenge before testing was introduced, visually it looks fine to me so I would, personally speaking, be moving on to the next challenge!