25 + 5 Clock Tests Timeout or Fail Inconsistently

I’ve double checked everything, and I’m pretty sure I should be passing all the tests, but most of the timer tests either timeout or report that the code isn’t functioning. I am not using React.

I admittedly have a somewhat hacky solution to keep the timer ticking when it switches from break back to session, but not even the switch from session to break test is passing so I don’t really want to devote a bunch of effort into trying something else on that because it looks to me like the tests have a problem.

I accidentally refreshed the page by editing my code before posting the test results, so I ran the tests again and a different number of tests failed. I remember specifically only 1 out of the four increment/decrement button tests passed, but now they all pass. There were also less timeouts this go around. So this is all quite odd. Here’s two different sets of results. As you can see they are different!

https://codepen.io/CoolCode22/pen/JodamVO

#25 + 5 Clock tests

    passes:20 failures:9 duration:573.26

    #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).1050ms
        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.

        Timer has nzot reached 00:00.
        FCC_Global</test/f/</i<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:168082

        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.293ms
        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.291ms
        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.278ms
        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.281ms
        6. I should not be able to set a session or break length to <= 0.821ms
        7. I should not be able to set a session or break length to > 60.1742ms
        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.
        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).

        25 + 5 clock has started but time displayed is not changing : expected +0 to be above +0
        p@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:531:3191
        u@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:407:130
        FCC_Global</e.exports/n.isAbove@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:556:960
        FCC_Global</test/</</e/<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:177611
        p@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:94539
        FCC_Global</n/H/<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:95877
        FCC_Global</n/O/</<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:94902
        r@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1:1169
        s@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1:1381

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

        25 + 5 has started but time displayed is not changing: expected '00' to not equal '00'
        h@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:531:2123
        u@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:407:130
        FCC_Global</e.exports/n.notStrictEqual@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:556:736
        FCC_Global</test/</</e/<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:178121
        p@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:94539
        FCC_Global</n/H/<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:95877
        FCC_Global</n/O/</<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:94902
        r@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1:1169
        s@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1:1381

        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.

        25 + 5 clock has started but time displayed is not changing: expected '00' to not equal '00'
        h@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:531:2123
        u@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:407:130
        FCC_Global</e.exports/n.notStrictEqual@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:556:736
        FCC_Global</test/</</e/<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:178845
        p@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:94539
        FCC_Global</n/H/<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:95877
        FCC_Global</n/O/</<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:94902
        r@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1:1169
        s@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1:1381

        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.

        Timer has not reached 00:00.
        FCC_Global</test/f/</i<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:168082

        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.

        Timer has not reached 00:00.
        FCC_Global</test/f/</i<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:168082

        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.

        Timer has not reached 00:00.
        FCC_Global</test/f/</i<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:168082

        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.

        Timer has not reached 00:00.
        FCC_Global</test/f/</i<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:168082

    #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".

        Timer has not reached 00:00.
        FCC_Global</test/f/</i<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:168082

        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.
#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).1048ms
    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.

    Timer has not reached 00:00.
    FCC_Global</test/f/</i<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:168082

    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.

    Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    createTimeoutError@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:261902
    FCC_Global</</a/Kb.prototype._timeoutError@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:266162
    FCC_Global</</a/Kb.prototype.resetTimeout/this.timer<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:264234

    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.

    Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    createTimeoutError@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:261902
    FCC_Global</</a/Kb.prototype._timeoutError@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:266162
    FCC_Global</</a/Kb.prototype.resetTimeout/this.timer<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:264234

    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.

    Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    createTimeoutError@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:261902
    FCC_Global</</a/Kb.prototype._timeoutError@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:266162
    FCC_Global</</a/Kb.prototype.resetTimeout/this.timer<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:264234

    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.

    Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    createTimeoutError@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:261902
    FCC_Global</</a/Kb.prototype._timeoutError@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:266162
    FCC_Global</</a/Kb.prototype.resetTimeout/this.timer<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:264234

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

    Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    createTimeoutError@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:261902
    FCC_Global</</a/Kb.prototype._timeoutError@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:266162
    FCC_Global</</a/Kb.prototype.resetTimeout/this.timer<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:264234

    7. I should not be able to set a session or break length to > 60.

    Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
    createTimeoutError@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:261902
    FCC_Global</</a/Kb.prototype._timeoutError@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:266162
    FCC_Global</</a/Kb.prototype.resetTimeout/this.timer<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:575:264234

    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.1069ms
    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).

    25 + 5 clock has started but time displayed is not changing : expected +0 to be above +0
    p@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:531:3191
    u@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:407:130
    FCC_Global</e.exports/n.isAbove@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:556:960
    FCC_Global</test/</</e/<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:177611
    p@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:94539
    FCC_Global</n/H/<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:95877
    FCC_Global</n/O/</<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:94902
    r@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1:1169
    s@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1:1381

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

    25 + 5 has started but time displayed is not changing: expected '00' to not equal '00'
    h@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:531:2123
    u@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:407:130
    FCC_Global</e.exports/n.notStrictEqual@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:556:736
    FCC_Global</test/</</e/<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:178121
    p@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:94539
    FCC_Global</n/H/<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:95877
    FCC_Global</n/O/</<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:94902
    r@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1:1169
    s@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1:1381

    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.

    25 + 5 clock has started but time displayed is not changing: expected '00' to not equal '00'
    h@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:531:2123
    u@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:407:130
    FCC_Global</e.exports/n.notStrictEqual@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:556:736
    FCC_Global</test/</</e/<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:178845
    p@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:94539
    FCC_Global</n/H/<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:95877
    FCC_Global</n/O/</<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:94902
    r@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1:1169
    s@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:1:1381

    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.

    Timer has not reached 00:00.
    FCC_Global</test/f/</i<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:168082

    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.

    Timer has not reached 00:00.
    FCC_Global</test/f/</i<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:168082

    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.

    Timer has not reached 00:00.
    FCC_Global</test/f/</i<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:168082

    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.

    Timer has not reached 00:00.
    FCC_Global</test/f/</i<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:168082

#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".

    Timer has not reached 00:00.
    FCC_Global</test/f/</i<@https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:581:168082

    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.

Welcome back to the forum @cool2

I could not see the reset button.
Cannot see the timer display.

Happy coding

whaaat? that’s extremely weird. the reset button is the little refresh emoji. here’s how things look on my end.

could you please send me a screenshot of what things look like on your end?

Hi @cool2

It was due to the screen size. On another screen size I can see the timer.

When I ran the tests, some of them are taking a long time.

does anyone here know why that might be happening? why the tests are seemingly breaking?